javascript - "use strict"; now allows duplicated properties? -
i found in last chrome 42 , ff 37.0.2 lines of code legal
"use strict"; var o = { p: 1, p: 2 };
(copy-pasted mdn )
in ie 10-11 , opera 28.0.1750 throws error expected.
in same time,
abc=0;
causes error (undeclared variable) expected.
does know caused such change?
there bugzilla ticket here. gather (here , other pages have looked up), duplicate properties legal in ecmascript version 6, opposed es5, forbidden in strict mode.
Comments
Post a Comment