while Loops: Coding lesson for kids

In “while Loops”, children learn about while count < 5 do and count = count + 1.

while count < 5 do: 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 Lua in Coding at Pearls Valley Academy — The language behind Roblox’s Luau.

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.