JAVASCRIPT · ОСНОВЫ · LESSON 03

Meaning doesn't change.

const · about 12 minutes

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

Name for constant value

const creates a variable that is not planned to be given a new value.

const days = 7;

✦ A week always has seven days.

STEP 2

Choose the right word.

If you change the number, use let. If the value remains the same, it is const.

const pet = "кот";
console.log(pet);

✦ There's a cat on the screen.

IN-CLASS PRACTICE

Type the code yourself

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

const color = "синий";
console.log(color);
Open the editor for class work
HOMEWORK

Solve it yourself

Create const city with the word «Киев» and output city.

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

Opening up your homework