for (initialization; comparison; continuation) { instructions... }
 LC  Performs the initialization, then
evaluates the comparison and
repeats 
  all instructions between the winged brackets as long as the comparison
is true resp. non-zero. The continuation statement will be executed
after the instructions and before the next repetition. This repetition of instructions
is called a loop.
Initialization and continuation can be any expression or
function call. A for loop is often used to increment a counter for a fixed
number of repetitions. 
Remarks:
		
- Loops can be prematurely terminated by break, and prematurely repeated
            by continue.
 
          - The initialization and continuation statements can be omitted. The comparison statement must always be present. 
 
          -  The winged brackets can be omitted when the loop contains only
            one instruction. 
 
        Example:
		
var i;
for (i=0; i<5; i++) // repeat 5 times
	x *= x; // calculate the 5th power of x
See also:
if, while, goto, break, continue, comparisons
  ► latest
  version online