0

What is a return statement?

Please explain me very clearly.

26th Oct 2016, 3:07 PM
Raamkishore
Raamkishore - avatar
2 Answers
+ 2
When a return statement is executed, you exit the current function (the execution will resume where the function was called) and return a value.
26th Oct 2016, 3:13 PM
Zen
Zen - avatar
0
To lead on from the above answer, say you wanted to set a variable equal to a function, then the variable would equal the number returned by the function once executed (if it is a number)
27th Oct 2016, 1:39 AM
Adrian Ellis
Adrian Ellis - avatar