On This Month in JavaScript
JS features that are Baseline widely available, plus what’s graduating next month
86 widely available · 1 graduating in December
Newly available features projected to become widely available next month (30 months after their Baseline low date).
The difference(), intersection(), isDisjointFrom(), isSubsetOf(), isSupersetOf(), symmetricDifference(), and union() methods of the JavaScript Set object performs operations between two sets.
Newest Baseline widely available dates first.
The Intl.Segmenter API creates a locale-aware text splitter that can separate a string into meaningful graphemes, words, or sentences.
The Object.groupBy() and Map.groupBy() static methods group values of arrays and iterables based on a function that returns a key for each value.
The Promise.withResolvers() static method is an alternative to the Promise() constructor that returns both the promise and resolution functions. You can use this to access resolve and reject outside the scope of the executor function.
The transfer() and transferToFixedLength() methods of ArrayBuffer move a buffer from one context to another (for example, to a worker).
The Array.fromAsync() static method copies items from an async iterable object to make a new array.
The isWellFormed() method of strings returns a boolean indicating if the string contains any Unicode lone surrogates. The toWellFormed() method returns a new string where all lone surrogates are replaced by the Unicode replacement character.
The toReversed(), toSorted(), toSpliced(), and with() methods of arrays and typed arrays return changed copies of arrays. They stand in contrast to methods such as sort() or reverse() that change arrays in place.
The Worker() constructor accepts { type: "module" } to load scripts that use import and export. Also known as ECMAScript modules or ESM in workers.
The findLast() and findLastIndex() methods of arrays and typed arrays search an array in reverse order for the first item that satisfies a test function.
The at() method of arrays and typed arrays returns the item at an index, including negative indices for getting items relative to the end of an array. Also known as the relative indexing method.
The Object.hasOwn() static method checks whether an object has a given property. It's a more robust alternative to the Object.prototype.hasOwnProperty() method.
The at() method of strings returns the character (one UTF-16 code unit) at an index, including negative indices for getting the character relative to the end of the string. Also known as the relative indexing method.
The SharedArrayBuffer object represents bytes shared between multiple workers and the main thread. The Atomics object safely accesses SharedArrayBuffer data to make sure predictable values are read and written and that operations are not interrupted.
The BigInt64Array and BigUint64Array typed arrays represent 64-bit integers, signed and unsigned respectively.
The cause property of errors records the specific original cause of the error, particularly for errors that have been re-thrown.
The Intl.DisplayNames API provides localized names of language, region, script, and currency codes.
The Intl.ListFormat API creates a locale-aware formatter that turns iterable objects into localized strings.
The WeakRef and FinalizationRegistry objects hold references to garbage-collectable objects without creating strong references that prevent their garbage collection.
The BigInt JavaScript type represents integers of any size, including integers too large for the primitive Number type.
The Intl.Locale API parses Unicode locale identifiers, with language, region, and script codes, such as zh-Hans-CN or en-GB.
The Intl.RelativeTimeFormat API creates a locale-aware formatter that turns an object representing a relative time (such as '1 day ago') into a localized string.
The logical AND assignment (&&=) and the logical OR assignment (||=) operators short-circuit the respective binary logical operators.
The nullish coalescing (??) and nullish coalescing assignment (??=) operators return (or assign) its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.
The Promise.any() static method returns a promise that fulfills as soon as the first of an iterable of promises fulfills, with that promise's value. Otherwise, it rejects with an AggregateError when all of the promises have rejected.
The replaceAll() method of strings returns a new string where all matches of a pattern (a string or regular expression) have been substituted with a replacement string.
To improve readability for numeric literals, underscores (_) can be used as separators. For example, 1_050.95 is equivalent to 1050.95.
The Promise.allSettled() static method waits for an array of promises to settle (resolve or reject).
The #! comment at the absolute start of a script or module is treated as a normal comment and is ignored by the JavaScript engine.
The flat() and flatMap() methods for arrays creates a new array such that each nested array item is concatenated into it.
Async generator functions (async function*) create iterators that return multiple promises, one after another, on-demand.
Asynchronous iterator objects, such as those returned by promises or generator functions, are iterable with the for await .. of loop.
The destructuring assignment syntax is a JavaScript expression that unpacks values from arrays, or properties from objects, into distinct variables.
The globalThis property accesses the global this value (and hence the global object itself) across environments.
Omit the binding parameter of a catch clause when you don't need information about the exception in a try ... catch statement.
The spread (...) syntax allows an iterable, such as an array or string, to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected.
The matchAll() method of strings matches a string against a regular expression and returns an iterator of all results, including capturing groups.
The trimStart() and trimEnd() methods of strings return a new string with whitespace removed from the beginning or end of the string.
Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded expressions, and special constructs called tagged templates.
The Intl.PluralRules API creates a locale-aware object that tells you which of the language's pluralization rules apply based on a given number.
The promise finally() method executes a function when the promise settles (resolves or rejects).
Arrays are iterable with the for … of statement and enumerable with the methods entries(), keys(), and values().
JavaScript modules allow code to be organized into reusable units. Modules use import to load other modules and export to declare what is available to import from other modules. In HTML, modules are loaded with <script type="module">.
The Intl API provides language sensitive string comparison, number formatting, date and time formatting, and more.
The async and await keywords allow you to use the asynchronous, promise-based behavior of a function without using promise chains.
The padStart() and padEnd() methods of strings return a string lengthened to a minimum number of characters by adding characters to the start or end of the string.
The exponentiation (**) operator returns the result of raising the first operand to the power of the second operand.
The copyWithin() method of arrays and typed arrays shifts or copies items of an array to another index of the array without changing its length.
The fill() method of arrays and typed arrays sets all or some items of an array to a given a value.
The find() and findIndex() methods of arrays and typed arrays search an array for the first item that satisfies a test function.
The includes() method of arrays and typed arrays returns whether a given value appears in the array.
The Array.from() and typed array .from() static methods copy items from an iterable or array-like object to make a new array.
The Array.of() and typed array .of() static methods create new arrays from the values of any number of arguments.
Generator functions (function*) create iterators that return multiple values, one after another, on-demand.
The Proxy and Reflect JavaScript built-ins intercept and define custom behavior for fundamental language operations (such as property lookup, assignment, enumeration, or function invocation).
The normalize() method of strings returns a Unicode normal form of a string as a new string. More than one code point sequence can represent the same characters. You can use the normalize() method to find canonically or compatibly equivalent strings.
Typed arrays are iterable with the for … of statement and enumerable with the methods entries(), keys(), and values().
The codePointAt() method returns the numeric value of the UTF-16 code point at an index of the string. The fromCodePoint() method returns a string created from one or more code points.
The includes() method of strings returns whether a search string appears within the string.
The String.raw() static method interpolates template literal substitutions, but ignores escape sequences. It is the tag function for template literals.
The repeat() method of strings returns the original string repeated a number of times.
The startsWith() and endsWith() methods of strings returns whether a search string appears at the beginning or end of the provided string.
A Symbol value is a unique, non-enumerable primitive value used for encapsulation or information hiding. For example, a symbol can be a key of an object that can never collide with any other key.
Unicode point escapes (\\u{}) represent Unicode characters within strings.
A WeakSet object stores unique values of any type without creating strong references to the values, such that membership in the set does not prevent garbage collection of the value.
The array splice() method changes an array in-place. You can use it to delete items, overwrite items, or insert items, starting from an index.
Functions are series of statements that can be called and return a value. The function keyword (as in function () { }) and arrow (=>) expression create functions. The JavaScript functions protocol includes default and rest parameters and binding to this.
The for...of loop operates on a sequence of values sourced from an iterable object, such as arrays, array-like objects, DOM collections, iterators, generators, and user-defined iterables. All built-in iterators inherit from the Iterator class.
JavaScript is a programming language that runs in browsers, usually through the <script> element. JavaScript has changed over many years. This feature represents the oldest language features, such as built-in objects, statements, and operators. Also known as ECMAScript.
The JSON API provides static methods for parsing values from and converting values to JavaScript Object Notation (JSON), a serialization format for objects, arrays, numbers, strings, Boolean values, and null.
Map objects hold key-value pairs and remember the original insertion order of the keys.
The number type (and Number object) represents floating-point numbers, such as 42 or -4.201, while the Math API contains mathematical functions and constants. JavaScript can also represent boundless negative and positive values as Infinity or not-a-number as NaN (as in 0 * Infinity).
A promise represents an asynchronous operation which eventually succeeds or fails.
The RegExp object represents a regular expression, a notation for matching text patterns.
The string type (and String object) represents a sequence of characters.
Typed arrays are ordered lists of JavaScript values, where all values are of the same numerical type, such as 8-bit integers or 32-bit floating point numbers.
A WeakMap object holds key-value pairs that do not create strong references to its keys, such that value data can be associated with a key without preventing garbage collection of the key.