4. An overview of ES2018 and ES2019
4.1. ECMAScript 2018
Major new features:
- Asynchronous Iteration (Domenic Denicola, Kevin Smith)
Rest/Spread Properties (Sebastian Markbåge) New regular expression features:
RegExp named capture groups (Gorkem Yakin, Daniel Ehrenberg)
- RegExp Unicode Property Escapes (Mathias Bynens)
- RegExp Lookbehind Assertions (Gorkem Yakin, Nozomu Katō, Daniel Ehrenberg)
s
(dotAll
) flag for regular expressions (Mathias Bynens) Other new features:Promise.prototype.finally()
(Jordan Harband)- Template Literal Revision (Tim Disney)
4.2. ECMAScript 2019
Major new features:
Array.prototype.{flat,flatMap}
(Michael Ficarra, Brian Terlson, Mathias Bynens)Object.fromEntries
(Darien Maillet Valentine) Minor new features:String.prototype.{trimStart,trimEnd}
(Sebastian Markbåge)Symbol.prototype.description
(Michael Ficarra)- Optional catch binding (Michael Ficarra)
Array.prototype.sort()
is guaranteed to be stable (Mathias Bynens). Changes that are mostly internal:Well-formed
JSON.stringify
(Richard Gibson)- JSON superset (Richard Gibson)
Function.prototype.toString
revision (Michael Ficarra)
当前内容版权归 exploringjs.com 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 exploringjs.com .