Lesson 18: while — Repeat While Condition Holds
A while loop repeats a block as long as a condition is True. To end it, something inside must eventually make the condition False.
Like "keep stirring while the foam isn't ready". Without an exit — an infinite loop.
- while
- A condition-based loop.
- infinite loop
- A loop that never stops.