MCQ Practice Single Best Answer Topic: Block scope in JavaScript

Q What will be the output of the following JavaScript code?

const a = 11;
{
    const a = 22;
    {
        const a = 33;
        console.log(a);
    }    
}
 

Question ID
#20281
Subchapter
Block scope in JavaScript
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A 22
  • B 33
  • C Undefined
  • D 11
Correct Answer: B

Explanation


33

Share This Question

Share this MCQ with your friends or study group.