Aa

Text size

?

Map / Loops

🔁 Loops

A loop repeats code while a condition is true. for loops count; while loops keep going until something changes. Most loop bugs are off by one or never stop.

  • while
  • for
  • ++
  • +=
  • nested for
  • break
  • continue
  • charAt(i)

🛠 You will build: A pattern printer and a number game

0 / 10 done

  1. 🔮 Predict 1. Adding up with for
  2. 👣 Trace 2. Doubling with while
  3. 🔮 Predict 3. How many times?
  4. 🧩 Order 4. Countdown
  5. ✏️ Fill in 5. Every second number
  6. 🐞 Debug 6. The loop that never stops
  7. 🐞 Debug 7. One step too far
  8. 🔧 Modify 8. A bigger triangle
  9. ⌨️ Write 9. Count the vowels
  10. ⌨️ Write 10. Guess the number

Unit check

Earlier activities again, with new inputs and edge cases. They also come back on the map as review the next day.

  1. 🔮 Predict Check 1. Check: counting down by threes
  2. ⌨️ Write Check 2. Check: count the digits