JScript includes several ways to execute a statement or block of statements repeatedly. In general, repetitive execution is called looping or iteration. An iteration is simply a single execution of a loop. It is typically controlled by a test of a variable, where the value is changed each time the loop is executed. JScript supports four types of loops: for loops, for...in loops, while loops, and do...while loops.
In This Section
- for Loops
Discusses how JScript uses for loops and provides some practical examples.
- for...in Loops
Describes the concept of for...in loops and explains how to use them in JScript.
- while Loops
Discusses the two types of while loops and explains how they differs from for loops.
- break and continue Statements
Describes how to use the break and continue statements to override the behavior of a loop.