-
In the FCC blockchain tutorial, why can't we have uint256 returning in the function retrieve, why is it separately returns(uint256). Is returns another function here? if so why is retrieve() used here at all. PS: An absolute beginner here, forgive me if this is very basic |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hello @vk00007 |
Beta Was this translation helpful? Give feedback.
-
Thank you, I get it now. |
Beta Was this translation helpful? Give feedback.
-
Hi, Appreciate if someone can help me here. I tried to search for JavaScript, but couldn't. What did I do wrongly? Thanks. |
Beta Was this translation helpful? Give feedback.
Hello @vk00007
In solidity the
returns
statement is just to specify the type of data you are going to return, the reason we create this function is because you will not always use REMIX, as favoriteNumber is a public variable, Remix automatically set up a button for you, but when you are going to develop locally you will not have it, so the retrieve function is agetter
function.