JAVASCRIPT · ОСНОВЫ · LESSON 02

A box with a name

let · about 12 minutes

Learning with progressRead the summary for free. To save the work, log in to the account.
STEP 1

Save the number.

let creates a variable called a name box. Sign = puts a value in it.

let points = 5;

✦ points stores 5.

STEP 2

Show me the contents.

Write the variable name in console.log without quotation marks, otherwise you will see only the word itself.

let points = 5;
console.log(points);

✦ There'll be 5.

IN-CLASS PRACTICE

Type the code yourself

Type an example manually. Check the names, brackets and signs.

let stars = 3;
console.log(stars);
Open the editor for class work
HOMEWORK

Solve it yourself

Create a score variable using let, put 7 in it and output score.

The answer is hidden. Use similar examples from the lesson notes.

Opening up your homework