JavaScript 和 WebAssembly 新特性

本节介绍 JavaScript 语言中的新特性,这些语言特性定义在 ECMA-262 (ECMAScript)ECMA-402 (the ECMAScript Internationalization API),以及 WebAssembly (Wasm)

我们的目标是通过 易于理解的代码示例 来提供新语言特性的 简明说明。有关更深入的文档,请参阅每个解释中的外部链接。

  1. Optional chaining ECMAScript
  2. Subsume JSON a.k.a. JSON ⊂ ECMAScript ES2019
  3. Intl.NumberFormat Intl
  4. globalThis ECMAScript
  5. Weak references and finalizers ECMAScript
  6. 稳定的数组排序 Array.prototype.sort ECMAScript ES2019
  7. Symbol.prototype.description ECMAScript ES2019
  8. Object.fromEntries ECMAScript ES2019
  9. Promise combinators ECMAScript ES2020
  10. Array.prototype.flatArray.prototype.flatMap ECMAScript ES2019
  11. Numeric separators ECMAScript
  12. String.prototype.matchAll ECMAScript ES2020
  13. Intl.ListFormat Intl
  14. Public and private class fields ECMAScript
  15. Intl.RelativeTimeFormat Intl
  16. Well-formed JSON.stringify ECMAScript ES2019
  17. JavaScript modules ECMAScript ES2015
  18. BigInt: arbitrary-precision integers in JavaScript ECMAScript ES2020
  19. Optional catch binding ECMAScript ES2019
  20. String.prototype.trimStart and String.prototype.trimEnd ECMAScript ES2019
  21. Revised Function.prototype.toString ECMAScript ES2019
  22. Dynamic import() ECMAScript ES2020
  23. Promise.prototype.finally ECMAScript ES2018
  24. Intl.PluralRules Intl
  25. Object rest and spread properties ECMAScript ES2018