break Statement

Top  Previous  Next

Terminates the current loop, or if a label is specified, terminates the corresponding statement.


break ([label]);


labelOptional. Indicates the label of the statement you are breaking from.


break ends an iterative (do, for, or while) statement and exits the current loop or statement. If break is used within nested statements, it ends only the smallest enclosing do, for, or while statement. The argument can be used in both simple and compound statements.