ECMAScript 2018(第九版 JS)已于 6 月底正式發(fā)布,帶來了許多新特性。ECMAScript 2018 于今年2月出爐草案,TC39 技術(shù)委員會每兩個月開會一次,討論當(dāng)前草案的現(xiàn)狀。ECMAScript 2018 主要包含內(nèi)容:
異步迭代器:原生支持在 JavaScript 中對異步獲取的數(shù)據(jù)做迭代。
Object Rest/Spread Properties
Promise.prototype.finally
Template Literal(模板字面量):取消 Escape-Sequenzen 限制
正則表達式:
支持 s (dotAll) 模式
Unicode 屬性轉(zhuǎn)義(Property Escape)
支持后行斷言(Lookbehind Assertions)
命名捕獲組(named capture group)
ECMAScript 2018 規(guī)范 PDF 地址:
https://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf