Skip to content

ECMAScript 各版本特性

时间轴

  • 2009
    ES5
    严格模式
    JSON
    bind
  • 2015-06
    ES6
    let、const
    解构赋值
    模板字符串
    模块规范
    class
    Map Set WeakMap WeakSet
    Promise
    Proxy
    Reflect
    Symbol
  • 2016-06
    ES7
    Array.prototype.includesArray
    幂运算符 **运算符
  • 2017-06
    ES8
    Object.values()/Object.entries()Object
    Object.getOwnPropertyDescriptors()Object
    String.prototype.padStart()/String.prototype.padEnd()String
    函数参数尾逗号Function
    Async/Await
    共享内存 和 原子(Atomics)
  • 2018-06
    ES9
    Lifting template literal restriction
    s (dotAll) flag for regular expressionsRegExp
    RegExp named capture groupsRegExp
    Rest/Spread Properties
    RegExp Lookbehind AssertionsRegExp
    RegExp Unicode Property EscapesRegExp
    Promise.prototype.finallyPromise
    Asynchronous Iteration
  • 2019-06
    ES10
    Object.fromEntries()Object
    String.prototype.trim()/String.prototype.trimStart()/String.prototype.trimEnd()String
    Array.prototype.flat()/Array.prototype.flatMap()Array
    Function.prototype.toString()Function
    Symbol.prototype.descriptionSymbol
    JSON superset/JSON.stringify()JSON
    可选的 catch 绑定
  • 2020-06
    ES11
    String.prototype.matchAll()String
    Promise.allSettled()Promise
    globalThis
    BigInt
    import/import.meta
    可选链操作符 ?.运算符
    空值合并运算符 ??运算符
  • 2021-06
    ES12
    String.prototype.replaceAll()String
    Promise.anyPromise
    WeakRef
    WeakRef
    逻辑赋值运算符 &&=、||=、??=运算符
    数字分隔符
  • 2022-06
    ES13
    Object.prototype.hasOwnProperty()Object
    .at()
    顶层 await
    正则 d 修饰符和 .indeces 属性RegExp
  • 2023-06
    ES14
    数组查找法方法增强Array
    数组拷贝方法增强Array
    Hashball语法
    WeakMap支持Symbol
  • 2024-06
    ES15
    Well-Formed Unicode Strings
    分组方法 .groupBy()
    正则 v 修饰符RegExp
    Promise.withResolvers()Promise
    Atomics.waitAsync
    ArrayBuffer.prototype.transferArray
  • 2025-06
    ES16
    新的 Set 方法
    RegExp ModifiersRegExp
    Import Attributes
    JSON ModulesJSON
    Sync Iterator helpers
    Promise.tryPromise

参考链接