Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #36561

Re: "use strict"; in a recent Firefox

From Jake Jarvis <pig_in_shoes@yahoo.com>
Newsgroups comp.lang.javascript
Subject Re: "use strict"; in a recent Firefox
Date 2019-05-03 15:28 +0200
Organization A noiseless patient Spider
Message-ID <qahfm1$dga$1@dont-email.me> (permalink)
References <use-strict-20190502195737@ram.dialup.fu-berlin.de> <18ndmeg9fnold$.dhcs3f0xlczh.dlg@40tude.net>

Show all headers | View raw


Am 03.05.2019 um 15:09 schrieb JJ:
> On 2 May 2019 19:01:49 GMT, Stefan Ram wrote:
>>    I read on a webpage that duplicate keys were detected in
>>    strict mode. I cannot see this with a recent Firefox:
>>
>> |>> "use strict"; ({ a: 2, a: 3 })
>> |<- Object { a: 3 }
>>
>>    . Ok, so, the explanation is:
>>
>>    Duplicate keys are now legal since ES6, even in strict mode!
> 
> I got an "Unexpected token" exception on both Firefox and Chromium.
> 
> Which brower and version, or JavaScript interpreter that allow such code?
> 

You have to keep the parentheses

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: "use strict"; in a recent Firefox JJ <jj4public@vfemail.net> - 2019-05-03 20:09 +0700
  Re: "use strict"; in a recent Firefox Jake Jarvis <pig_in_shoes@yahoo.com> - 2019-05-03 15:28 +0200
    Re: "use strict"; in a recent Firefox JJ <jj4public@vfemail.net> - 2019-05-04 18:18 +0700

csiph-web