Re: "var" declarations shadowing properties from Window.prototype

On Aug 10, 2012, at 11:14 PM, Brendan Eich wrote:

> Allen Wirfs-Brock wrote:
>> 
>> I don't think there is anything special about the global named undefined.  As long as it is a own property of the global object  (which is is spec'ed to be) 'var undefined' is fine because redundant var declarations don't do anything anything.  If undefined was inherited from window.prototype it would be a different story.
> 
> Agreed, just noting that const x = 42; var x; is not tolerated in ES6 as proposed (right?).

correct. 

Received on Saturday, 11 August 2012 17:01:39 UTC