brianleroux/wtfjs — pull request #49 by mrbkap (2013-02-11 22:02:24+00:00)
Title: Slight correction about why an unbound name on left hand side of a for-in header ends up on the global

While reading through your blog, I noticed a small error in why in `for (name in ...) ...` `name` ends up on the global: unbound assignment ignores the this object entirely and instead looks up the static scope chain (including with objects) looking for a scope with the name on it. In the case that no such scope is found, a new property is created on the global object and is used. You can test this by passing a different `this` object to `allNames` (e.g. using `.call({})` and observing that the behavior is the same.

I'm not sure what your policy for editing old posts is, but I figured you might be interested anyway.