✦ Code Lab · JavaScript

⚡ JavaScript

The language of the web — the code that makes pages move, react and play. Lessons unlock in order — finish one to open the next.

⭐ 0 XP · 🔥 0 day streak

0 of 12 lessons done

1

Say Hello

Your mission: print two messages — first Hello, Code Lab!, then I am learning to code. — each exactly as written, each on its own line.

▶ Start
2

Meet Variables

Your mission: put Nova in the hero box and Pip in the sidekick box. The printing lines are already written for you.

▶ Start
3

Number Power

Your mission: fix the three sums so the screen shows 12, then 7, then 24.

▶ Start
4

Word Builder

Your mission: use the two word boxes to print Code Lab, then print Code Lab! on the next line.

▶ Start
5

Big or Small?

Your mission: finish the two choices. A score of 85 should print You pass!, and an age of 7 should print Kid coder.

▶ Start
6

Loop the Loop

Your mission: the loop below is set to stop far too early. Fix the stop rule so it counts 1, 2, 3, 4, 5 — each on its own line — and the Done! line after the loop will print itself.

▶ Start
7

Counting Down

Your mission: the countdown prints 3 forever because the counter never goes down. Add the missing line so it prints 3, 2, 1, then Blast off!.

▶ Start
8

Treasure Lists

Your mission: print the first fruit, print how many fruits there are, add "mango" to the list, then print the new count and the new last fruit.

▶ Start
9

Make a Machine

Your mission: finish the double machine so it hands back its input times two. The lines below the machine already test it with 4 and 9.

▶ Start
10

Character Cards

Your mission: fill in Pip's card — name Pip, 4 legs, sound "squeak" — then the three print lines will introduce him.

▶ Start
11

Guess the Number

Your mission: finish judge so a guess of 3 answers Too low!, 9 answers Too high!, and 7 answers You got it!.

▶ Start
12

The Final Challenge

Your mission: loop over the prices and add them up, then print Total: 20. One more choice after that: a total of 20 or more earns Free delivery! — anything less prints Keep shopping.

▶ Start
Your JavaScript certificate
Finish all 12 lessons to unlock it.

Stuck is part of coding.

Every lesson has a hint that nudges without spoiling. Read, try, run, adjust — that loop is the whole skill.

▶ Play now — it's free