0
What is a use of return
2 ответов
+ 4
Well, as the name suggests, it is used to return from a function ( it may or may not take a value with it depending on the return type of the function )
+ 1
A function can return a value using the return statement.
Return stops the function's execution, and sends the value back to the calling code.
Check this post about Return statement:
https://www.sololearn.com/discuss/1226950/?ref=app
https://www.sololearn.com/discuss/2705345/?ref=app
https://www.sololearn.com/discuss/136121/?ref=app