+ 2

What does it mean with "return()"?

7th Dec 2017, 4:57 AM
Danlee Platnumz
Danlee Platnumz - avatar
2 Answers
+ 2
The return statement causes your function to exit and hand back a value to its caller. The point of functions in general is to take in inputs and return something. The return statement is used when a function is ready to return a value to its caller.
7th Dec 2017, 6:00 AM
WhiteShadow
WhiteShadow - avatar
+ 2
The "return" statement returns a value from a function. If the return statement is absent or nothing is returned, then "none" is returned from the function. You can return a single value or multiple values. Multiple values returned will return a tuple.
7th Dec 2017, 6:47 AM
Gregory Estrada
Gregory Estrada - avatar