55
return is how a function gives something back to you. Imagine sending a child to the market with money; the return is the bread they bring back.
Without return, a function does its work but doesn't share the result. If you want to use a calculation later, you must return it.
Log in to add a comment.