Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Definite iteration: Difference between revisions

From Coderwiki
new: info, examples, indefinite
 
(No difference)

Latest revision as of 09:29, 15 August 2025

Definite iteration is where a code block is repeated a known number of times.

It is generally count controlled, meaning the code will repeat either for different values in a range (for loop), or repeat for each element in a collection (foreach loop).

Examples of definite iteration

edit edit source

Indefinite iteration

edit edit source

Indefinite iteration is the opposite of definite iteration.

See: Indefinite iteration