Menu
I have some code like the following:
[CODE]{
var object = 1;
{
var object = 2;
}
alert(“object = “+object);
}
And when alert is executed it shows that object has the value 2. Shouldn’t scoping rules result in the alert reporting that object has the value 1, since the object defined within the inner brackets is not visible to the code within the outer bracket?