JavaScript Iterator Methods

Beginner
6 min read
Updated: Nov 2026
21 method guides
Method index

About This Index

This page is the JavaScript Iterator Methods index. An Iterator can produce values one by one. Helper methods such as map(), filter() and take() let you transform those values lazily — only when they are needed. Each row below links to a full guide with syntax, examples you can run, and FAQs.

Learn what an Iterator is on /js/iterator. Use this page when you need a specific method such as map() or Iterator.from().

Iterator helpers need a current browser.

The helpers such as map(), filter(), take() and toArray() are Baseline Newly available (2025). Static methods like Iterator.concat() and helpers like chunks() are even newer. Check with typeof Iterator.prototype.map === "function" (or the matching name) before you rely on them in older environments.

How to Call an Iterator Method

Turn an iterable into an iterator, then chain helpers:

JavaScript
const nums = [1, 2, 3, 4, 5, 6].values();

const result = nums
  .filter((n) => n % 2 === 0)
  .map((n) => n * 10)
  .take(2)
  .toArray();

console.log(result);   // [20, 40]

JavaScript Iterator Methods Table

All method guides in this JavaScript tutorial series (21 tutorials), grouped by what they do.

Create and combine iterators

4 methods

Static methods on Iterator. Call them as Iterator.from(...), not on an instance.

MethodDescriptionTutorial
Iterator.concat()Yield values from several iterables, one after another, as a single lazy iterator.Open
Iterator.from()Turn an iterable or a plain iterator into a proper Iterator that has the helper methods.Open
Iterator.zip()Walk several iterables together and yield arrays of matching positions.Open
Iterator.zipKeyed()Like zip(), but each step is an object with the keys you choose.Open

Transform values (lazy)

7 methods

These return a new iterator helper. Values are produced only when you pull them.

MethodDescriptionTutorial
map()Run a function on each value and yield the results.Open
filter()Keep only the values for which the callback returns true.Open
flatMap()Map each value to an iterable, then yield those inner values one by one.Open
take()Yield only the first N values, then stop.Open
drop()Skip the first N values, then yield the rest.Open
chunks()Split the stream into non-overlapping arrays of a fixed size.Open
windows()Yield a sliding window of N values at a time.Open

Consume into a result

4 methods

Walk the whole iterator (or stop early) and build a final value.

MethodDescriptionTutorial
forEach()Run a function for every value. Returns undefined.Open
reduce()Combine all values into one result with a reducer function.Open
join()Turn every value into one string, with an optional separator.Open
toArray()Collect every remaining value into a new Array. A common last step.Open

Iterator protocol helpers

2 methods

Special methods that make iterators iterable and disposable.

MethodDescriptionTutorial
[Symbol.dispose]()Closes the iterator (calls return) for use with using / await using.Open
[Symbol.iterator]()Returns the iterator itself so for...of and spread work on it.Open

Frequently Asked Questions

They are methods on Iterator.prototype such as map(), filter(), take(), drop() and toArray(). They let you transform a stream of values without building a full array first. Many of them return a new lazy iterator you can chain.
The Iterator page explains the idea: next(), done, iterables vs iterators, and why helpers help. This index lists every method guide so you can jump straight to the one you need.
A helper such as map() does not run the callback until you ask for the next value. That saves work, and it lets you use take() or find() on infinite generators without hanging.
Built-in iterators from arrays, maps and generators already inherit the helpers. Use Iterator.from() when you have a plain object with a next() method, or an iterable that does not yet return a proper Iterator.
Start with Iterator.from() or array.values(), then learn map(), filter() and take(). Finish chains with toArray(). When you are ready, read concat(), zip() and chunks().

Start with Iterator.from()

Open the guide for turning an iterable into a proper Iterator with helpers: syntax, examples, and FAQs.

Iterator.from() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

12 people found this page helpful