Iterator.concat()

Iterator.concat() and Joint Iteration

Iterator.concat(...iterables) (ES2026) lazily chains iterables end to end; unlike [...a, ...b] it copies nothing and accepts infinite sources, but it rejects bare strings. Joint iteration (ES2027) walks iterables in step: Iterator.zip() yields arrays, Iterator.zipKeyed() yields objects, and the mode option is "shortest" (default), "longest" (filled from padding) or "strict" (throws on unequal lengths).

Iterator.concat() ships in Chrome 146 1 , Firefox 147 555 , Safari 26.4 10 and Node.js 26 2,131 ; Iterator.zip() only in Chrome 153 and Firefox 148, so this listing ran in headless Firefox 153.

Sequencing and zipping iterables (Firefox 153)JavaScriptLive
function* naturals() { for (let n = 1; ; n++) yield n; }
const seq = Iterator.concat(['a', 'b'], new Set([true]), naturals());   // copies nothing
console.log(JSON.stringify(seq.take(5).toArray()));
const names = ['Ann', 'Bo', 'Cy'], scores = [91, 78];
console.log(JSON.stringify(Iterator.zip([names, scores]).toArray()));
const padded = Iterator.zip([names, scores], { mode: 'longest', padding: ['?', 0] });
console.log(JSON.stringify(padded.toArray()));
console.log(JSON.stringify(Iterator.zipKeyed({ name: names, score: scores }).toArray()));

Feature-detect with typeof Iterator.zip === 'function', or load core-js 25,536 (github.com/zloirock/core-js (https://github.com/zloirock/core-js 25,536 )), which polyfills both.