- 1
While loop - Break
When using a while loop, and then using a break command, does the original if statement need to transition from true, to false and then to true again to restart the loop? What would be the advantage to this rather than putting more conditions into the if statement? Thanks!
4 ответов
+ 3
I'm agree with @DK's: if you need to break a loop and do it again as soon you've breaked it, you need to use the 'continue' statement (wich break only the actual iteration, not the entire loop, contrarly to the 'break' statement)...
+ 1
depends where you are putting that Break statement .
0
I did a little more reading I think I understand a bit better, thanks for the replies!