0Pricing
Javascript for Kids · Lesson

What Is a Function?

A function is a reusable block of code.

A Magic Spell! 🪄

Imagine you are a wizard. 🧙 A function is like a magic spell you can use again and again!

You write the spell once, then say its name whenever you want it to happen. ✨

Why Spells Are Cool 😎

Pretend you want to say "Hello!" ten times.

Instead of typing it ten times, you put it in a spell. Then you just cast the spell! 🎉

All lessons in this course

  1. What Is a Function?
  2. Making Your First Function
  3. Giving Functions Information
  4. Getting Answers Back
← Back to Javascript for Kids