ECMAScript 各版本特性
时间轴
- ES5严格模式JSONbind
- ES6let、const解构赋值模板字符串模块规范classMap Set WeakMap WeakSetPromiseProxyReflectSymbol
- ES7Array.prototype.includesArray幂运算符 **运算符
- ES8Object.values()/Object.entries()ObjectObject.getOwnPropertyDescriptors()ObjectString.prototype.padStart()/String.prototype.padEnd()String函数参数尾逗号FunctionAsync/Await共享内存 和 原子(Atomics)
- ES9Lifting template literal restrictions (dotAll) flag for regular expressionsRegExpRegExp named capture groupsRegExpRest/Spread PropertiesRegExp Lookbehind AssertionsRegExpRegExp Unicode Property EscapesRegExpPromise.prototype.finallyPromiseAsynchronous Iteration
- ES10Object.fromEntries()ObjectString.prototype.trim()/String.prototype.trimStart()/String.prototype.trimEnd()StringArray.prototype.flat()/Array.prototype.flatMap()ArrayFunction.prototype.toString()FunctionSymbol.prototype.descriptionSymbolJSON superset/JSON.stringify()JSON可选的 catch 绑定
- ES11String.prototype.matchAll()StringPromise.allSettled()PromiseglobalThisBigIntimport/import.meta可选链操作符 ?.运算符空值合并运算符 ??运算符
- ES12String.prototype.replaceAll()StringPromise.anyPromiseWeakRefWeakRef逻辑赋值运算符 &&=、||=、??=运算符数字分隔符
- ES13Object.prototype.hasOwnProperty()Object.at()顶层 await类正则 d 修饰符和 .indeces 属性RegExp
- ES14数组查找法方法增强Array数组拷贝方法增强ArrayHashball语法WeakMap支持Symbol
- ES15Well-Formed Unicode Strings分组方法 .groupBy()正则 v 修饰符RegExpPromise.withResolvers()PromiseAtomics.waitAsyncArrayBuffer.prototype.transferArray
- ES16新的 Set 方法RegExp ModifiersRegExpImport AttributesJSON ModulesJSONSync Iterator helpersPromise.tryPromise