Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Iteration [2/8]

The loop control variable, named i in this example, holds the number of the current iteration. [F8:Run]

The example prints out the value of the loop control variable i, in each iteration.

A for statement should not be ended by a semicolon because a for statement is not a plain statement. A for statement is a block-ended statement.