Getting Started    

break

The break statement lets you exit early from a for or while loop. In nested loops, break exits from the innermost loop only.

Here is an improvement on the example from the previous section. Why is this use of break a good idea?


  continue Other Data Structures