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

break

JavaScript 1.1+, ECMAScript 1.0+, JScript 1.0+ Nav3+, IE 3+, Opera3+ Syntax

break label;
						

Description

The keyword break provides a way to exit out of loop structures and switch conditionals prematurely. Most of the time, the word break appears on a line by itself, but there are times when a label will follow the keyword (see Table 6.21). When a label is used, code execution completely breaks out of the area designated by label and proceeds to the code that follows the area. To label a statement, simply place the label name followed by a colon (:) in front of the code that needs to be broken out of during code execution.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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