Es2022

Ecma International approves ECMAScript 2022

ECMAScript 2022 is officially a standard now! Let's see what's new in ECMAScript 2022.

ECMAScript 2022: Ergonomic brand check for private fields

ECMAScript 2022 provides a simpler way to check if an object has a given private field using the 'in' operator.

ECMAScript 2022 introduces at() method in Array, String, TypedArray

The at() method takes an integer value and returns the element at that index. It allows both positive and negative integers. Negative integers denote counting back from the last item in the array.

ECMAScript: Top-level await

We can only use await operator within an async method. In ECMAScript 2022 we will be able to use it outside of the context of an async method in our modules.

Understanding static class features in JavaScript (ECMAScript 2022)

Private and public static fields along with private static methods would be officially included in ECMAScript 2022.

Deep dive into public and private instance fields in JavaScript (ECMAScript 2022)

Class fields declaration allows declaring fields, up-front making class definitions become more self-documenting. As declared fields are always present, instances go through fewer state transitions. These class fields features would be officially included in ECMAScript 2022.

Private fields, methods and, accessors in JavaScript

The class fields proposal provides private fields for classes and instances to JavaScript. With this proposal, any class element can be private.