Every time you chain .filter() and .map() on an array, JavaScript creates two new arrays. For small lists this is invisible. For a large dataset, a generator producing values on demand, or a stream where you only need the first handful of results, you've materialized thousands of elements you immediately discard.

Iterator helpers are the lazy alternative. They shipped natively in Chrome 122, Firefox 131, and Safari 18.2 — no library, no polyfill, no build step.

What "lazy" means in practice

Array methods are eager: they run immediately and return a new fully-populated array.

const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];