Break and Continue
Break and Continue
- Early termination of a loop is accomplished using the break and continue statements.
- Break terminates the current loop immediately. The current-loop is the most deeply nested loop containing the break statement.
- Continue is similar to break, but goes on to the next iteration of the loop.