for loop-var = start-expr to end-expr [step step-expr] statement
Variable | Description |
---|---|
loop-var | A loop variable to hold the current value of the for loop. |
start-expr | A number which specifies the starting value of loop-var. |
end-expr | A number which specifies the end value of loop-var. |
step-expr |
Optional for incrementing loop-var by a value other than 1. Specify a positive number to increment, a negative number to decrement. |
statement | Code to be executed a specified number of times until loop-var is outside the range start-expr to end-expr; either a single statement or a series of statements. |