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 14 great preprocessors for developers who love to code Sometimes it seems like the rules of programming are designed to make coding a chore. Here are 14 ways preprocessors can help make software development fun again. By Peter Wayner Nov 18, 2024 10 mins Development Tools Software Development feature Designing the APIs that accidentally power businesses Well-designed APIs, even those often-neglected internal APIs, make developers more productive and businesses more agile. By Jean Yang Nov 18, 2024 6 mins APIs Software Development news Spin 3.0 supports polyglot development using Wasm components Fermyon’s open source framework for building server-side WebAssembly apps allows developers to compose apps from components created with different languages. By Paul Krill Nov 18, 2024 2 mins Microservices Serverless Computing Development Libraries and Frameworks news Go language evolving for future hardware, AI workloads The Go team is working to adapt Go to large multicore systems, the latest hardware instructions, and the needs of developers of large-scale AI systems. By Paul Krill Nov 15, 2024 3 mins Google Go Generative AI Programming Languages Resources Videos