ECMAScript 2022 has the next new options:
- Top-stage await, permitting the
awaitsearch term to be made use of at the top degree of modules.
- New class things, including public and private occasion fields, general public and non-public static fields, and personal occasion procedures and accessors.
- Static blocks in just lessons, to conduct per-course evaluation initialization.
#x in obj#x in objsyntax, to take a look at for the existence of private fields on objects.
- Standard expression match indices by means of the
/d/dflag, which features get started and conclude indices for matched substrings.
result inresidence on
Mistakeobjects, to be utilized to record a causation chain in glitches.
atapproach for Strings, Arrays, and TypedArrays, allowing for relative indexing and for use of
Object.hasOwn, an substitute to
Last June’s ECMAScript 2021 standardized capabilities these types of as
String.prototype.ReplaceAll, for changing instances of a substring, and the
AggregateError mistake variety.
Copyright © 2022 IDG Communications, Inc.