- From: Maciej Stachowiak <mjs@apple.com>
- Date: Thu, 03 Dec 2009 04:09:21 -0800
- To: Jorge Chamorro <jorge@jorgechamorro.com>
- Cc: "Mark S. Miller" <erights@google.com>, public-script-coord@w3.org
On Dec 3, 2009, at 4:06 AM, Jorge Chamorro wrote: > On 15/11/2009, at 23:45, Mark S. Miller wrote: > >> 1) Is the global object the same as the object at the end of the >> scope chain? (HTML5: yes. ES5: no). > > > Somehow, the truly last object in the scope chain is Object.prototype: > > Object.prototype.k= 27; > console.log(k); > -> 27 > > For it's the last place where a reference would ever be looked up... > or not ? > (now me ducks and runs :-) No, the prototype chain is a separate concept from the scope chain. Entries in the scope chain are conceptually objects each of which has its own prototype chain. Regards, Maciej
Received on Thursday, 3 December 2009 12:09:57 UTC