Learn Programming - ZedLX

A Free Computer Programming Tutorial for Beginners

Iteration [1/15]

Iteration

A for loop repeats the statements of a statement block.

A statement block consists of statements enclosed inside braces {} (i.e. curly brackets).

It can be said that a for loop repeats, or iterates, the execution of the following statement block.

In this example, the number of iterations is 7.

The statement sleepMs(600) slows down execution of the program.

Loading...