✦ 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
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 2Meet Variables
Your mission: put Nova in the hero box and Pip in the sidekick box. The printing lines are already written for you.
▶ Start 3Number Power
Your mission: fix the three sums so the screen shows 12, then 7, then 24.
▶ Start 4Word Builder
Your mission: use the two word boxes to print Code Lab, then print Code Lab! on the next line.
▶ Start 5Big 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 6Loop 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 7Counting 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 8Treasure 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 9Make 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 10Character Cards
Your mission: fill in Pip's card — name Pip, 4 legs, sound "squeak" — then the three print lines will introduce him.
▶ Start 11Guess 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 12The 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.
▶ StartFinish 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.