Javascript

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.

ECMAScript2021 adds new features WeakRef and FinalizationRegistry

ECMAScript2021 introduces new features WeakRef and FinalizationRegistry to manage garbage collection.

Normalizing Redux state to ensure good performance in React apps

In complex applications, client apps have to store and manage a large amount of nested data, and if the data is not normalized, it can be incredibly time-consuming for a program to lookup nested data which could become a performance concern.

ECMAScript 2021 introduces Promise.any() and AggregateError

ECMAScript 2021 introduces Promise.any() method which accepts an iterable of promises and waits for the first promise to fulfill, and its result becomes the outcome. If all the passed promises are rejected, it returns an AggregateError.