contract Helloworld {
    uint private simpleInt;

    function getValue() public view returns (uint) {
        return simpleInt;

What is the difference between "return" and "returns", I am a beginner.


The difference is that returns (uint) is defining the function as having 1 return variable, which is a uint. Related, but separate, is the statement return simpleInt;, which is actually returning simpleInt from the function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.