Possible Duplicate:
Is Chrome's JavaScript console lazy about evaluating arrays?
Consider this javascript:
var foo = {bar : 1111};
console.log(foo);
console.log(foo.bar);
foo.bar = 2222;
console.log(foo);
console.log(foo.bar);
In Firefox's firebug, this shows what I would have expected:
Object { bar=1111}
1111
Object { bar=2222}
2222
However, in Safari and Chrome's console it shows:
Object { bar=2222}
1111
Object { bar=2222}
2222
In other words, the object is showing the wrong attributes in the console when print-dumped, but the correct value if a specific attribute is printed.
Is this a quirk of the browsers? Or a fundamental aspect of object oriented javascript that I am missing?