Q. The output for the following code snippet would most appropriately be
Code:var a=5 , b=1
var obj = { a : 10 }
with(obj)
{
alert(b)
}
β
Correct Answer: (C)
1
Explanation: The interpreter checks obj for property b, fails and takes it from outside of with.