🏠 New in High Baseline Support: Array iterators
November 9, 2020
caniuse · mdn · [spec]([‘https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype-@@iterator’, ‘https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.entries’, ‘https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.keys’, ‘https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.values’])
Arrays are iterable with the for…of
statement and enumerable with the methods entries()
, keys()
, and values()
.