(Ad, please don’t block.)

Quizzes » Variables and assignment

1. const (1/3)

const x;

What happens?

2. const (2/3)

const obj = {a: 1};
obj.a = 2;

What happens?

3. const (3/3)

const obj = {a: 1};
obj = {};

What happens?

4. Nested block

const value = 'a';
{
  const value = 'b';
  console.log(value);
}
console.log(value);

What happens?


Correct answers: 0 out of 0