Skip to main content
break and continue
- An unlabeled break statement will cause the current iteration of the
innermost looping construct to stop and the line of code following the
loop to run.
- An unlabeled continue statement will cause: the current iteration of
the innermost loop to stop, the condition of that loop to be checked,
and if the condition is met, the loop to run again.
- If the break statement or the continue statement is labeled, it will
cause similar action to occur on the labeled loop, not the innermost
loop.