Capstone: Table + Loop: Coding lesson for kids

In “Capstone: Table + Loop”, children learn about #numbers and total = total + numbers[i].

#numbers: The # gives the length of a LIST-STYLE table — it counts contiguous integer keys starting at 1, not string keys in a dictionary-style table.

total = total + numbers[i]: Every loop pass, adds the current item onto the running total.

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.