MCQ
Single Best Answer
Easy
QWhat will be the output of the following JavaScript code?
let a = 12;
{
var a = 12;
console.log(a);
}
ID: #20276
Block scope in JavaScript
78 views
Question Info
#20276Q ID
EasyDifficulty
Block scope in JavaScriptTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option D
Explanation
var a = 12; ^ SyntaxError: Identifier 'a' has already been declared
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic