O'Reilly logo

Platinum Edition Using XHTML™, XML, and Java™ 2 by Andrew H. Watt, Mike Morgan, Jim O'Donnell, Eric Ladd

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using JavaScript Statements

This section provides a quick reference to some of the more important JavaScript statements. Those listed here are in alphabetical order—many have examples. The formatting of these entries means the following:

  • All JavaScript keywords are in monospaced font.

  • Words in monospace italic represent user-defined names or statements.

  • Any portions enclosed in square brackets ([ and ]) are optional.

  • { statements} indicates a block of statements, which can consist of a single statement or multiple statements enclosed by braces.

The break Statement

The break statement terminates the current while or for loop and transfers program control to the statement that follows the terminated loop.

Syntax:

break

Example:

The following function ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required