Paul Krill
Editor at Large

ECMAScript 2024 JavaScript standard approved

The ECMAScript 2024 specification includes a new feature for transferring ArrayBuffers and advanced capabilities for working with string sets and constructing promises.

Stamp of approval. Accepted.
Credit: PanuShot/Shutterstock

ECMAScript 2024, the latest version of ECMA Internationalโ€™s standard for JavaScript, has been officially approved, with features including transferring ArrayBuffers and advanced capabilities for working with string sets.

The ECMAScript 2024 specification, also generally known as ECMA-262, was approved on June 26. Among the features are added facilities for resizing and transferring ArrayBuffers and SharedArrayBuffers. ArrayBuffers have previously enabled in-memory handling of binary data. The new feature extends ArrayBuffer constructors to take an additional maximum length that allows in-place growth and shrinking of buffers. SharedArrayBuffer was also extended to take an additional maximum length that allows in-place growth.

Another capability featured in ECMAScript 2024 is the addition of a RegExp/v flag for creating RexExps with more advanced features for working with sets of strings. Also introduced was the Promise.withResolvers convenience method for constructing promises. Promise.withResolvers has been described as a mechanism for managing asynchronous operations. The feature adds a static method, known as withResolvers, to the Promise constructor, which returns a promise along with its resolution and rejection functions conveniently exposed. ECMAScript 2024โ€™s Object.groupBy and Map.groupBy methods, meanwhile, are for aggregating data. And the Atomics.waitAsync method is for asynchronously waiting for a change to shared memory. The capability is primarily for use in agents that are not allowed to block. ECMAScript 2024 also adds the String.prototype.isWellFormed and String.prototype.toWellFormed methods for checking and ensuring that strings contain only well-formed Unicode.

In addition to being based on JavaScript, ECMAScript also is based on Microsoftโ€™s JScript, described as a legacy dialect of the ECMAScript standard. Some features that did not make it into ECMAScript 2024 are still contenders for ECMAScript 2025 next year. These include duplicate named capturing groups, for regex capturing groups to be repeated, and new Set methods in JavaScript, ย to add methods like union and intersection to JavaScriptโ€™s built-in Set class. Last yearโ€™s ECMAScript 2023 specification offered methods for searching and changing arrays and extended the WeakMap API.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorldโ€™s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorldโ€™s audience of software developers and other information technology professionals. Paul has won a โ€œBest Technology News Coverageโ€ award from IDG.

More from this author