0

What is a use of return

3rd Jul 2021, 4:06 PM
Hariahwar.R
Hariahwar.R - avatar
2 Answers
+ 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 )
3rd Jul 2021, 4:49 PM
Arsenic
Arsenic - avatar
+ 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
3rd Jul 2021, 7:34 PM
Cmurio
Cmurio - avatar