×

javascript · level 1 · unit 2 · lesson 1

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

A is a box with a name on it.

A variable is like a box with a label. You put something in the box, write a name on the label, and from then on you say the name to get it back.

makes a new box. In let name = "Sam"; the label is name, and the = puts "Sam" inside. Whatever is inside the box is called its .

To get the value back, use the name with no quotes, like console.log(name);. Spell it the same way every time, or JavaScript gives you a ReferenceError.

let name = "Sam";
console.log(name);

Read the = as “put into”, not “equals”.