Pilcrow Records

Scripter Javascript Tutorial

javascriptmusiclogicscripterbookexcerpttutorial

66 The for Statement

MDN: Loops and Iteration: for statement

The for statement is the most commonly used. It executes a block of code until a condition is false. The for statement has the following syntax:

for ( <initialize>; <condition>; <increment> ) {
	// code block to do something
}

In the above example: