--- url: "https://web.dev/blog/baseline-iterator-helpers" titulek: "Iterator helpers have become Baseline Newly available | Blog | web.dev" h1: "Iterator helpers have become Baseline Newly available Stay organized with collections Save and categorize content based on your preferences." popis: "Iterator helpers became Baseline Newly available as of March 31, 2025." jazyk: "en" kanonicka: "https://web.dev/blog/baseline-iterator-helpers" drobecky: ["Blog", "Iterator helpers have become Baseline Newly available"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 01:49:48" znaku: 5761 slov: 600 kodovani: "iso-8859-2" sha256: "a9e32adbd2e0c80e7c13297e50a93f2ab0e0818a480ae56b6da4f9e4630bbe6e" --- Iterator helpers have become Baseline Newly available Stay organized with collections Save and categorize content based on your preferences. Jeremy Wagner Published: May 1, 2025 If you write JavaScript, then iterating is something you do a lot of. You're either writing loops to work with arrays, or using functional programming methods such as [`map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/map), [`filter`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) and other similar methods to process all sorts of data. One sticking point with using these methods however, is that they're only available on arrays. If you wanted to use them on an iterable, you'd have to convert it to an array, and then call the method you'd need. This can be wasteful, or in cases where the iterable represents contains infinite dataset using [generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*), it isn't possible. However, now that iterator helpers have become Baseline Newly available, this ability is finally available across browsers. How do iterator helpers work? Iterator helpers are exposed by defining new methods on the [`Iterator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Iterator) object's `prototype`. These methods align with many functional programming methods you're used to using, such as [`map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Iterator/map), [`filter`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Iterator/filter), [`reduce`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Iterator/reduce), and other similar methods. For example, you could use an iterator helper on the `filter` method to filter list items by the contents of their `innerText` property for a collection of DOM nodes, which you can then use later in a `for` loop: `const posts = document.querySelectorAll("ul#specific-list > li") .values() .filter(item => item.textContent.includes("kiwi")); // For-of loops can only be used on iterables, which `posts` is! for (const post of posts) { console.log(post.textContent); }` In the preceding code snippet, the iterator helper method for `filter` is used to iterate over all `
  • ` elements in a specific `