• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

The break Statement

Going hand-in-hand with the continue statement is the break statement. Whereas the continue statement forces another iteration, the break statement jumps you out of the loop completely!

You typically use the break statement in while, for, for ... in, and do ... while statements (and switch statements, which we've not covered yet).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint