What will be the output of following code? var x = 1; { var x = 2; } alert(x);
Correct Answer: 2
Explanation:
Note: This Question is unanswered, help us to find answer for this one
JavaScript Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More JavaScript MCQ Questions
Method to call a function or evaluate an expression at specified intervals?
Which code snippet deletes cookie correctly?
Correct way to redirect to a URL in javascript?
What's the output? var foo = 10 << 1;
Which are true for Java script?
What is the original or first name of javascript?
var self=this; self.color='red'; self.getColor=function(){ return this.color; } self.getColor.call({color:'white'})); What is the return value?
How it will be evaluated ? null == undefined
The term 'javascript closure' refers to:
console.log([] == true)