while Loops: Coding lesson for kids

In “while Loops”, children learn about while (count < 5) { ... } and count = count + 1;.

while (count < 5) { ... }: Keeps repeating as long as the condition stays true.

count = count + 1;: Must be inside the loop and eventually make the condition false — or the loop runs forever!

This lesson is part of JavaScript in Coding at Pearls Valley Academy — What makes a webpage actually do something.

Each lesson starts with a short narrated, animated explanation, then hands-on practice. A wrong answer gets a gentle hint, never a penalty, and children earn stars and pearls as they go.