What is the value of the JavaScript array method values()? It's an iterator that iterates over the values of the array.

This means you can do:

for (x of arr.values())

But can't you already do

for (x of arr)?

(maybe there are more obscure ways to use iterators that I'm not aware of)

mastodon.social ↗

Sign in to like, save or reply.