Changes

Jump to: navigation, search

JavaScript Flow Control and Looping

6 bytes removed, 17:50, 26 May 2007
Breaking a Loop
== Breaking a Loop ==
Occasionally it is necessary to exit from a loop before it has met whatever completion criteria were specified are met. To achieve this , the ''break'' statement must be used. The following example contains a loop that uses the ''break'' statement to exit from the loop when i = 100 , even though the loop is designed to iterate 1000 times:
<pre>

Navigation menu