What is cross browser support for JavaScript 1.7's new features? Specifically array comprehensions and the “let” statement

后端 未结 3 1162
伪装坚强ぢ
伪装坚强ぢ 2020-12-07 00:50

https://developer.mozilla.org/en/New_in_JavaScript_1.7

A lot of these new features are borrowed from Python, and would allow the creation of less verbose apps, which

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 01:16

    No, when they say "JavaScript", they mean it literally: the ECMAScript engine used by Gecko. JScript and other engines (AFAIK) don't support these features.

    EDIT: According to wikipedia, JavaScript 1.7 implements ECMAScript "Edition 3 plus all JavaScript 1.6 enhancements, plus Pythonic generators and array comprehensions ([a*a for (a in iter)]), block scope with let, destructuring assignment (var [a,b]=[1,2])". So these features are not part of ECMAScript.

提交回复
热议问题