On 2010-02-05, at 18:08, Dmitry A. Soshnikov wrote:
> Scope chain (test): [
> global,
> {foo: undefined, bar: undefined},
> {foo: 20, test: function () {...}}
> ]
This is the key that I was missing, as Brendan made clear. Despite `foo` and
`bar` being declared inside the `with`, because declarations are hoisted, the
`var foo` is shadowed by the `with (this)` when the assignment `foo = 42` is
evaluated.
Thanks for the clarifying illustrations.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss