โ† Lessons BUILDER PATH

๐ŸŽช Variable Vault

Lesson 12 of 20
๐ŸŽช
Themed Universe
Circus Code
Variables are labeled boxes โ€” store the show's tickets, flips & stars, then change them to run the circus! ๐ŸŽช
๐ŸŽฏ Missions Day โœฆ
โ€ฆ
โ€ฆ
โ€ฆ
โ— โ— โ— circus.js JavaScript

  
circus ring LIVE

๐ŸŽช Circus Mission Step 1 of 5

โ€ฆ

๐Ÿ’ก Hint: โ€ฆ

๐ŸŽช Variable Vault

In Lessons 1โ€“3 you changed colours and styled buttons with CSS. Today you meet the most powerful idea in all of coding: the variable. A variable is a labeled box that stores a value โ€” and your program can use and change it. Tonight you're the Ringmaster of the ๐ŸŽช Circus! You'll store the show's data in variables and watch the circus ring change live as you edit them.

๐ŸŽช Variable Toolkit
var tickets = 8; // a number box
var juggler = "Bingo"; // a text box (quotes!)
โ†’ change the value โ†’ everything that uses it updates!
๐Ÿ“ฆvar makes a labeled box: var tickets = 8 stores the number 8 under the name tickets.
๐Ÿ”ขNumbers need no quotes: var flips = 4. Text needs quotes: var juggler = "Sam".
๐Ÿ”„Edit the gold box in the code โ†’ the circus ring updates live!
๐ŸŽฏHit โœ“ Check when the ring looks right to complete each mission.