ECMAScript 2022 has the adhering to new attributes:
- Prime-level await, letting the
awaitsearch phrase to be employed at the major amount of modules.
- New course components, such as community and non-public occasion fields, general public and non-public static fields, and personal instance strategies and accessors.
- Static blocks within courses, to carry out per-class analysis initialization.
#x in obj#x in objsyntax, to check for the presence of private fields on objects.
- Common expression match indices through the
/d/dflag, which delivers begin and conclude indices for matched substrings.
Mistakeobjects, to be utilized to record a causation chain in problems.
atmethod for Strings, Arrays, and TypedArrays, allowing for relative indexing and for use of
Item.hasOwn, an alternate to
Past June’s ECMAScript 2021 standardized abilities this kind of as
String.prototype.ReplaceAll, for replacing occasions of a substring, and the
AggregateError mistake style.
Copyright © 2022 IDG Communications, Inc.
Resource website link