Changelog

tc39/ecma262 · · 1 commit

Iterator objects gain a join() method

ECMAScript adds Iterator.prototype.join, letting iterators concatenate values into a string with an optional separator.

Iterator.prototype.join lands in the spec (bakkot6db9135)

ECMA-262 now defines Iterator.prototype.join(separator), which consumes an iterator, stringifies its values, and concatenates them with a separator (defaulting to ,).

It also spells out iterator-safe abrupt completion handling and skips undefined/null values during concatenation, making the new API's behavior precise for implementers.