0
Return function?
I can't really understand the function of return. Can you please help me? thanks
5 ответов
+ 2
Think of function like a machine, with input, process and output.
Input are passed from main program to the process unit by arguments.
Output are passed by process unit back to main program by return.
For example,
https://code.sololearn.com/cw2XMUsZndcR/?ref=app
+ 1
I just went to code the demo for you and have appended to my previous answer.
By the way, who downvoted my answer? You?
+ 1
You are welcome ^^
Good luck with your learning.
0
Thanks for the answer. but can you give me one of scenario where return function should be use?
0
I am sorry I don't know that is a button for downvote, I see your code, it helps me a lot. Thank you very much. I am just a newbie here with no IT certificate nor degree. I am Science teacher but I want to learn this trendy programming. Thank you for your effort to answer with your code.