Lesson 17: while loop
Sometimes you want to repeat an action several times. while (condition) { ... } runs the block again and again as long as the condition is true. You need a counter (like int i) that changes inside the loop — otherwise the condition never becomes false and the loop runs forever. i++ adds 1 to i.