while / repeat
Conditional loop.
Syntax
while condition do ...
Description
while loops while the condition is true. repeat..until loops while the condition is FALSE (runs at least once).
Example
Loading editor…
Expected output
0 1 2
When to use?
Indefinite repetition.