MCQ Single Best Answer Easy

QWhat will be the output of the following JavaScript code?

var a = 12;
{
    var b = 12;
    console.log(a);
}

ID: #20275 Block scope in JavaScript 86 views
Question Info
#20275Q ID
EasyDifficulty
Block scope in JavaScriptTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 10
  • B 12
  • C Undefined
  • D Error
Correct Answer: Option B

Explanation

12
No Previous Next Question

Share This Question

Challenge a friend or share with your study group.