Arrow Functions: Coding lesson for kids

In this lesson, children learn to rewrite a function expression as an arrow function.

function add(a, b) { return a + b; }: The classic way to write a function.

const add = (a, b) => a + b;: An ARROW function — same thing, shorter. No curly braces or "return" needed for a single expression.

arrow: this = surrounding scope function: this = who called it: Arrow functions don't get their own 'this' — they inherit 'this' from the code around them. Classic functions get a new 'this' each call.

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.