JavaScript 和 WebAssembly 新特性

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

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

  1. Class static initializer blocks ECMAScript
  2. WebAssembly integration with JavaScript BigInt WebAssembly ECMAScript
  3. Atomics.wait, Atomics.notify, Atomics.waitAsync ECMAScript ES2020
  4. Logical assignment ECMAScript ES2021
  5. Intl.DisplayNames Intl
  6. Fast, parallel applications with WebAssembly SIMD WebAssembly
  7. RegExp match indices ECMAScript
  8. String.prototype.replaceAll ECMAScript ES2021
  9. Top-level await ECMAScript
  10. Nullish coalescing ECMAScript ES2020
  11. Optional chaining ECMAScript ES2020
  12. Subsume JSON a.k.a. JSON ⊂ ECMAScript ES2019
  13. Intl.NumberFormat Intl
  14. globalThis ECMAScript ES2020
  15. Weak references and finalizers ECMAScript ES2021
  16. 稳定的数组排序 Array.prototype.sort ECMAScript ES2019
  17. Symbol.prototype.description ECMAScript ES2019
  18. Object.fromEntries ECMAScript ES2019
  19. Promise combinators ECMAScript ES2020 ES2021
  20. Array.prototype.flatArray.prototype.flatMap ECMAScript ES2019
  21. Numeric separators ECMAScript ES2021
  22. String.prototype.matchAll ECMAScript ES2020
  23. Intl.ListFormat Intl
  24. Module namespace exports ECMAScript ES2020
  25. Public and private class fields ECMAScript
  26. Intl.RelativeTimeFormat Intl
  27. Well-formed JSON.stringify ECMAScript ES2019
  28. JavaScript modules ECMAScript ES2015
  29. BigInt: arbitrary-precision integers in JavaScript ECMAScript ES2020
  30. Optional catch binding ECMAScript ES2019
  31. String.prototype.trimStart and String.prototype.trimEnd ECMAScript ES2019
  32. Revised Function.prototype.toString ECMAScript ES2019
  33. Dynamic import() ECMAScript ES2020
  34. Promise.prototype.finally ECMAScript ES2018
  35. Intl.PluralRules Intl
  36. Object rest and spread properties ECMAScript ES2018