ES2022 Get Ready For A Change

Santo Lococo
3 min readFeb 8, 2022

As many people know that have been in the Software Development Field for any amount of time, is that when it comes to knowledge, there is always more to learn. A big part of this is because of the constant demand to improve upon the way that we interact with code to make it more streamlined or versatile. ECMAScript has already gone through several variations in its relatively short life it appears that it is time for another one. If you plan on using JavaScript, it will be best to get up to date on all the new features ECMAScript2022 has to offer.

  1. Classes get the ability to declare fields without the constructor

2. Classes get the ability to declare Private fields with the # key. This means that methods can be set within class objects like this

they can only be accessed from within the class.

3. we will be able to declare static class fields and private static methods using the keyword “static”

4. Check if a field exists within a class with the “in” operator.

5. the ability to declare the await Operator outside of asynchronous functions.

6. We will finally have the ability to index without the length property by using the at() function. In the below example the console logs result in the same result.

7. A function has been added to replace Object.prototype.hasOwnProperty.call() which was a work around to not being able to employ a prototype object. it is simply hasOwn().

--

--