0
For loops
I can't understand what's the purpose of continue; and how it helps us
2 ответов
+ 3
It ignores the following instructions in a for loop, and jumps to the next step.
+ 3
Giannis Kallergis the continue statement is a shortcut to the next iteration of the loop, skipping past the remaining statements of the loop and going back to its beginning.
There are few, if any, situations where it is really needed. In my professional experience I have never seen it used in real code, and it has never entered into my own code. The only statement that is even more rare than continue is the goto statement.