Skip to content
ExploreMapGamesStoriesComicsVideosStudioPrintablesCode LabJourneys
By age ▾
  • 🧸 Tiny Explorers2–5
  • 🦉 Curious Learners6–8
  • 🔭 Young Investigators9–12
  • 🚀 Trailblazers13–17
👤Parent sign in
Kids Amazing World

A creative learning playground. No ads, no tracking, no chat. Every item is reviewed before it appears.

Explore

  • Explore
  • Learning journeys
  • Surprise me
  • Parent planner

For grown-ups

  • Child safety
  • Privacy
  • Terms (draft)
  • Free & Premium
  • Parent sign in

About this content

Some items in this build are placeholders written for development. Third-party resources are only listed with permission, a license, or an official embed.

← Advanced Coding

🔬 Map and filter

🤖

Professional programmers often skip loops for tools like filter (keep only the items that pass a test) and map (change every item). You give them a tiny function, and they do the looping. A tiny function written like x => x * 2 is called an arrow function.

🎯 Write evensSquared(list): keep only the even numbers, then square each one. evensSquared([1, 2, 3, 4]) should give [4, 16].

Output

Press Run to see what your code prints.

Lesson 3 of 16 · Lesson map · Your code runs safely inside this page and is never sent anywhere.