Loops (for / while)
for for fixed repetition, for...of for traversing arrays, while for conditional repetition.
Simple enough for a 5-year-old to understand
for loop
Three parts: initialization, condition, increment. Used for a specific number of repetitions.
for (let i = 1; i <= 3; i++) { console.log(i);}🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)
🎯 Expected output: 1
2
3
4
5