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.
- All Coding lessons
- What Is JavaScript For?
- console.log()
- Variables: let vs const
- Data Types: String, Number, Boolean
- Order the Lines
- Comments: What Doesn't Run
- Boolean Operators: && || !
- Template Literals & Type Conversion
- if / else if / else
- for Loops
- Arrays: Index & push
- Array Methods: length, includes, for-of