Tables as Key/Value Pairs: Coding lesson for kids
In “Tables as Key/Value Pairs”, children learn about pet = {name = "Rex", age = 3}; pet.age.
pet = {name = "Rex", age = 3}: A table can also act like a dictionary — key/value pairs, using = instead of a colon.
pet.age: Looks up the value stored under the key "age" — here, that is 3.
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.