For Loop

A for loop instructs the server to repeat an action a specific number of times.

//for (initial, condition-check, increment)

for (var j = 1; j < 10; j++) {

   total = parseFloat(report['Table'].table[reg.y + j][3]);

}

The first expression in the loop (j = 1) initializes the loop variable. The second expression (j < 10) is a condition used to check when to terminate the loop (i.e., when the condition evaluates false). The third expression (j++) is the variable increment that is evaluated at the end of every iteration. The “j++” notation is the same as “j=j+1,” i.e., increment by one.

<< Conditionals © 1996-2013 InetSoft Technology Corporation (v11.5) While Loop >>