The values() method of an array returns an iterator object that has the value of each element in the array.
const pets = ['cat', 'dog', 'bird'];
// iterator object
const petsValues = pets.values();
// for of loop on the object
for (const pet of petsValues) {
console.log(pet);
}
// "cat"
// "dog"
// "bird"