Loading lesson path
16th edition of the ECMAScript standard, released in June 2025, includes several enhancements to make JavaScript more readable and efficient.
JavaScript 2025 includes built-in methods for set operations, such as intersection(), union(), and difference(), eliminating the need for manual loops or third-party libraries.
Returns the symmetric difference between to sets isSubsetOf() Returns true if this set is a subset of a given set isSupersetOf() Returns true if this set is a superset of a given set isDisjointFrom() Returns true if this set has no elements in in a given set
The introduction of an Iterator object provides a functional interface with lazy evaluation, allowing developers to wrap various iterators like Arrays. A new set of functional operators for iterators (like .map(), .filter(), and .take()) allows for lazy evaluation, improving performance when handling large data streams.
Returns an iterator that skips a specified number of elements before yielding the rest every() Returns true if all elements satisfy a test function filter() Returns an iterator containing elements that satisfy a filter function find() Returns the first element that satisfies a test function flatMap() Returns an iterator by mapping each element and then flattening the results forEach() Executes a function once for each element in the iterator. from() creates an iterator object from an iterable map() Returns an iterator with all elements transformed by a map function reduce() Applies a reducer function against each element to reduce it to a single value some() Returns true if at least one element satisfy a test function take() Returns an iterator that yields a specified number of elements
Formula
RegExp /v flag
An "upgrade" to the /u (unicode) flagRegExp.escape() Returns a string where regex characters are escaped
Formula
A Typed Array that stores 16 - bit floating - point numbersMath.f16round()
Formula
Returns the nearest 16 - bit floating point numberPromise.try() Starts a promise chain for handling promise rejections
These features are relatively new. Older browsers may need an alternative code (Polyfill).
method returns the union of two sets.
method returns a new set containing the elements which are in this set, or in the argument set, or in both:
const A = new Set(['a','b','c']);
const B = new Set(['b','c','d']);
const C = A.union(B);