promptdojo_

while, break, and the infinite loop AI ships — step 7 of 9

Cursor wrote a loop that should print every number from 1 to 6, skipping 4. Instead, the loop stops dead at 4 and never prints 5 or 6. The wrong keyword is on line 3.

Fix it so the output is 1, 2, 3, 5, 6 — each on its own line.

The break is on line 3 — but read the whole snippet first.

full-screen editor opens — close anytime to keep reading.