Array iterators
Widely available since 2020-11-09
Arrays are iterable with the for … of
statement and enumerable with the methods entries()
, keys()
, and values()
.
Learning resources on MDN
Browser support
- Chrome 66 Released on 2018-04-17
- Chrome Android 66 Released on 2018-04-17
- Edge 14 Released on 2016-08-02
- Firefox 60 Released on 2018-05-09
- Firefox for Android 60 Released on 2018-05-09
- Safari 10 Released on 2016-09-20
- Safari on iOS 10 Released on 2016-09-13
Specifications
- ECMAScript Language Specification (#sec-array.prototype-@@iterator), from TC39 (Ecma International).
- ECMAScript Language Specification (#sec-array.prototype.entries), from TC39 (Ecma International).
- ECMAScript Language Specification (#sec-array.prototype.keys), from TC39 (Ecma International).
- ECMAScript Language Specification (#sec-array.prototype.values), from TC39 (Ecma International).