JS: Array.prototype.values
(new in JS: ECMAScript 2015)
xArray.values()
-
- Return a Generator.
- Each entry is the element's value of the array.
for (const e of ["a", "b", "c"].values()) console.log(e); /* a b c */
Array.prototype[Symbol.iterator]
Array.prototype.values
is identical to
Array.prototype[Symbol.iterator]
console.log( Array.prototype.values === Array.prototype[Symbol.iterator], ); // true