+ 2
var x=2, obj={ x:1, change:function(){ var x=3; } } obj.change(); alert(obj.x);
//output= 1 //do u have any explanation?
5 Réponses
+ 9
obj.x /*(1)*/ will be alerted because the function change() isn't called in alert. I hope you got it.
+ 3
Yes, It would be far easier to read. Plus you can't see the question without going on the post.
+ 2
Please put the code in the description instead of the title next time.
+ 1
would it differ, Rrestoring?
+ 1
ok