-
hii, In solidity why we write returns(uint256)? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
We write returns (uint256) to indicate that you will be returning a variable of uint256 type in your function. |
Beta Was this translation helpful? Give feedback.
-
@gnutan181 We use the keyword
If you want to return multiple values, you can also do so
|
Beta Was this translation helpful? Give feedback.
We write returns (uint256) to indicate that you will be returning a variable of uint256 type in your function.
If you want to return a string then you will write returns (string memory) and if you don't want to return anything you wouldn't write returns keyword.