preface

HTTPS://2ality.com/2020/09/ecmascript-2021.html
Author: Dr. Axel RauschmayerCopy the code

This article tracks the actual and potential “features” of ES2021. I’ll be updating it in real time.

1 About ECMAScript versions

Note that since the “TC39” process has been set up, “ECMAScript Versions” has become much less important. Now, what matters most is where the proposed “feature” is at. Once it reaches Stage 4, it can be used normally. However, even then, you still need to make sure that the engine you are using supports this “feature”.

Proposed ECMAScript 2020 features

Here, recall the stages each proposed “ESCMAScript” “feature” went through:

  • Stage 4, meaning that this “feature” will appear in the next release (or a release after that).
  • Stage 3, meaning that the “feature” is still in the running for inclusion in the next release.

2.1 Phase 4 and part of the DRAFT ECMAScript

  • String.prototype.replaceAll
  • Promise.any()
  • WeakRefs
  • Logical assignment operators
  • Numeric separators

2.2 Candidate Features (Phase 3)

The following “features” are in Stage 3:

  • Legacy RegExp features in JavaScript
  • Private methods and getter/setters for JavaScript classes
  • Class public instance fields & private instance fields
  • Class public static fields, private static methods, private getters/setters
  • Hashbang grammar
  • Top-level await
  • RegExp match indices
  • Atomics.waitAsync
  • .item
  • Import assertions

3 FAQ Answers

3.1 What is the significance of stage?

They refer to The mature stage of The “TC39” process, for more information, see The “TC39 Process” section in “JavaScript for Thirsty”.

3.2 What happened to my favorite proposed “feature”?

If you want to know at what stage various proposed “features” are in, refer to the READme for the ECMA-262 GitHub repository

3.3 Is there an official list of ECMAScript “features” here?

Yes, the “TC39” repository lists completed proposals and mentions which “ECMAScript versions” will introduce them.

Free books about ES2020

The following two books cover JavaScript up to ECMAScript 2020 and will be updated when ECMAScript 2021 is released.

  • JavaScript for Thirsty Programmers (free online)
  • Deep JavaScript (free to read)

Review previous articles

What depth interpretation Vue3 source | built-in component teleport “lot”?

Depth interpretation Vue3 source | the compile and runtime patch process

Depth interpretation Vue3 source | from the compilation process, understand the static nodes to ascend

❤️ Love triple punch

Through reading, if you think you have something to gain, you can love the triple punch!!

Ask the wayman — Wu Liu (wechat public account: Code Center)