+ 6

Is return acts like a break ... ??

I donno correctly but heres the code, read on the comment inside it https://code.sololearn.com/cgXNHDbEQ8YZ/?ref=app

11th Dec 2017, 12:38 PM
I'm_Groot
I'm_Groot - avatar
6 odpowiedzi
+ 9
if you have return in function function return what is specified and nothing after that in fuction would not be executed
11th Dec 2017, 12:50 PM
Vukan
Vukan - avatar
+ 5
👍👍👍
11th Dec 2017, 12:50 PM
I'm_Groot
I'm_Groot - avatar
+ 3
it Isn't a break,but causes a break!
11th Dec 2017, 3:19 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 2
these answers are all not true ! e.g. destructors are called after return check the code example in appendix... there is a whole science going on after the return. https://code.sololearn.com/cVkwl9eia714/?ref=app
11th Dec 2017, 10:58 PM
---
--- - avatar