Assigning to globals in strict mode

Oliver Hunt oliver at apple.com
Mon Oct 18 09:59:05 PDT 2010


On Oct 18, 2010, at 9:56 AM, Jeff Walden wrote:

> On 10/17/2010 02:56 PM, Oliver Hunt wrote:
>> Similarly
>> 
>> "use strict"; this.declared = 5; declared = (delete declared, 5);
>> 
>> Will not throw, but instead will recreate the |declared| property.
> 
> Shouldn't |delete declared| throw per 11.4.1 5a?

No because declared is deletable -- i didn't do 'var declared', it's an ordinary object property that just happens to be on the global object.

> 
> Jeff
--Oliver




More information about the es5-discuss mailing list