JavaScript Block scope in JavaScript Question #20284
Single Choice Easy

QWhat will be the output of the following JavaScript code?

var a = 11;
var a = 12;
console.log(a)
 

ID: #20284 Block scope in JavaScript 113 views
Question Info
#20284Q 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

Explanation


12

Share This Question

Challenge a friend or share with your study group.