Array iterators
Arrays are iterable with the for … of
statement and enumerable with the methods entries()
, keys()
, and values()
.
Status
Baseline Widely Available (since 2020-11-09)
MDN documentation
Specifications
- ECMAScript® 2026 Language Specification (#sec-array.prototype-@@iterator), from TC39 (Ecma International).
- ECMAScript® 2026 Language Specification (#sec-array.prototype.entries), from TC39 (Ecma International).
- ECMAScript® 2026 Language Specification (#sec-array.prototype.keys), from TC39 (Ecma International).
- ECMAScript® 2026 Language Specification (#sec-array.prototype.values), from TC39 (Ecma International).
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
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist