Programming for Kids - ZedLX

The Easiest Way to Learn Computer Programming, for Free

Iteration [1/14]


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.