Next version of JavaScript standard gains formal approval, while the new capabilities are already supported by browsers. Credit: metamorworks / Getty Images ECMAScript 2022, the next update to the official standard behind JavaScript, has been formally approved, with new capabilities ranging from class elements to a top-level await capability. The ECMAScript 2022 specification was approved by ECMA International on June 22. But the features already are available in most browsers, said Robert Palmer, co-chair of the TC39 committee that shepherds the standard, in March. Feature availability in JavaScript engines is more relevant to developers than appearance in the actual specification, Palmer said. ECMAScript 2022 has the following new features: Top-level await, allowing the await keyword to be used at the top level of modules. New class elements, including public and private instance fields, public and private static fields, and private instance methods and accessors. Static blocks within classes, to perform per-class evaluation initialization. The #x in obj#x in obj syntax, to test for the presence of private fields on objects. Regular expression match indices via the /d/d flag, which offers start and end indices for matched substrings. The cause property on Error objects, to be used to record a causation chain in errors. The at method for Strings, Arrays, and TypedArrays, allowing for relative indexing and for use of Object.hasOwn, an alternative to Object.prototype.hasOwnProperty. Last June’s ECMAScript 2021 standardized capabilities such as String.prototype.ReplaceAll, for replacing instances of a substring, and the AggregateError error type. Related content feature What is Rust? Safe, fast, and easy software development Unlike most programming languages, Rust doesn't make you choose between speed, safety, and ease of use. Find out how Rust delivers better code with fewer compromises, and a few downsides to consider before learning Rust. By Serdar Yegulalp Nov 20, 2024 11 mins Rust Programming Languages Software Development how-to Kotlin for Java developers: Classes and coroutines Kotlin was designed to bring more flexibility and flow to programming in the JVM. Here's an in-depth look at how Kotlin makes working with classes and objects easier and introduces coroutines to modernize concurrency. By Matthew Tyson Nov 20, 2024 9 mins Java Kotlin Programming Languages analysis Azure AI Foundry tools for changes in AI applications Microsoft’s launch of Azure AI Foundry at Ignite 2024 signals a welcome shift from chatbots to agents and to using AI for business process automation. By Simon Bisson Nov 20, 2024 7 mins Microsoft Azure Generative AI Development Tools news Microsoft unveils imaging APIs for Windows Copilot Runtime Generative AI-backed APIs will allow developers to build image super resolution, image segmentation, object erase, and OCR capabilities into Windows applications. By Paul Krill Nov 19, 2024 2 mins Generative AI APIs Development Libraries and Frameworks Resources Videos