Lecture JS - Array Iterators
Lecture JS - Array Iterators
Objects
The Array Iterator Objects in JavaScript—values(), keys(), and entries()—allow you to manually
iterate over an array’s elements, indexes, or both. These methods return iterator objects, which
conform to the iterator protocol.
values()
Returns a new Array Iterator that contains the values for each index in the array.