Web features explorer

Iterators and the for...of loop

Widely available
Tags: javascript Groups: JavaScript > Iterators

The for...of loop operates on a sequence of values sourced from an iterable object, such as arrays, array-like objects, DOM collections, iterators, generators, and user-defined iterables. All built-in iterators inherit from the Iterator class. To learn more, see Iterator, Iterator.prototype[Symbol.iterator](), for...of at MDN.

Compatibility