THE finished proposalspublished by ECMA TC39 (Technical Committee 39) on GitHub, marks the following four features to be released this year:
- Array search from lasta proposal of
.findLastIndex()array and typed array methods. Searching for an element in an array is a very common programming pattern, the proposal says. Scenarios where this feature would be used include when a developer knows that searching for an item from last to first may have better performance, or developers care about the order of items.
- Allow symbols as keys in WeakMap keys, a proposal that extends the WeakMap API to allow the use of unique symbols as keys. Currently, WeakMaps is restricted to only allow objects as keys.
- Change table by copya proposal that provides additional methods on
TypedArray.prototypeto activate the changes on the array by returning a new copy of it with the change.
- Hashbang Grammara proposal to match the de facto usage in some JS CLI hosts that allow Shebangs/Hashbangs. These hosts remove the hashbang to generate valid JS source texts before moving to JS engines. This plan would move stripping to engines and unify and standardize how it is done.
Updated versions of ECMAScript are traditionally finalized by ECMA in June. Last years ECMAScript 2022 featured class elements and high-level wait abilities.
Copyright © 2023 IDG Communications, Inc.