🏠 New in High Baseline Support: Iterators and the for...of loop

January 29, 2018

caniuse · mdn · [spec]([‘https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-%iteratorprototype%-object’, ‘https://tc39.es/ecma262/multipage/ecmascript-language-statements-and-declarations.html#sec-for-in-and-for-of-statements’])

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.

Source features