+ 1
Which is best: goto or loops-while, for and do-while?
I was studing recursion when I saw about the "goto" command. I know that I may use it in recursion, but the loops-while and for do the same thing, no? Then, which and why I should use: goto or loops?
4 Réponses
+ 4
i think goto statement make code buggy sometimes
+ 3
goto usually just makes your code harder to read and slower, the only place where it's acceptable to use it is when you're breaking out of a nested loop. (but even there a control variable should do the trick)
0
Thank you so much all