Functions with Parameters: Coding lesson for kids
In “Functions with Parameters”, children learn about function square(n) return n * n end and square(4).
function square(n) return n * n end: n is a PARAMETER — a placeholder filled in with whatever value is passed when the function is called.
square(4): Calls square with 4 as the argument — inside the function, n becomes 4.
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.