🗒 Cheat Sheet← Lesson
BitWithBite
JavaScript Worksheet

⚡ Loops

Chapter: JavaScript · Level ★☆☆ · Time: 30 min
SCORE___ / 20
NameClassDate
After this worksheet you can
Write for and while loopsLoop arrays with for...ofbreak/continueAvoid infinite loops
📚 Quick Recap

Loops are the engine of repetition in programming. Instead of writing the same line of code 100 times, you write it once and tell JavaScript to repeat it. In this lesson you'll learn every loop type JavaScript offers — when to use each one, how to control them with break and continue, and how to avoid the dreaded infinite loop.

🧠 Section A · Concept Check ● BEGINNER 4 × 1 = 4

1for(let i=0;i<3;i++) runs:
2for...of iterates:
3break does:
4while(true) without break is:

🧮 Section B · Problem Solving ● INTERMEDIATE 2 + 3×3 = 11

5The loop header has init; condition; .
6continue jumps to the next .
7Log 1..5 with a for loop.
8Sum [2,4,6] with for...of.
9What prints? for(let i=0;i<3;i++) console.log(i*10)

🚀 Section C · Challenge ● CHALLENGE 5

10Fix the infinite loop: while(i<5){console.log(i)}
💭 Reflection — the most useful thing I learned:
A ___/4   B ___/11   C ___/5   Total ___/20 Teacher's Signature Parent's Signature
✂ answer key — fold or cut before handing out

1-B   2-B   3-B   4-B  |  5 update (i++)   6 iteration   7 = for(let i=1;i<=5;i++) console.log(i)   8 = let s=0; for(const n of arr) s+=n; // 12   9 = 0 10 20  |  10 = Add i++ inside the loop

📄 Need offline practice?Download the print-ready PDF or open the one-page cheat sheet.
⬇ Worksheet PDF 🗒 Cheat Sheet