TypeError for "values() : Iterator" on Array page
Closed this issue · 1 comments
There is a TypeError for the "values() : Iterator" example in the "Array" page at http://www.javascripture.com/Array
`var x = ['a', 'b'];
// values is returned by x[Symbol.iterator] so you can just
// use x directly in the for (... of ...) loop
for (var value of x) {
console.dir(value);
}
// You can iterate over values explicitly
for (var value of x.values()) {
console.dir(value);
}`
Thank you for the service you provide. I am grateful. Your examples help me out quite a bit as a beginner.
Thanks for the feedback! Glad you like the site :)
Array.values() is not currently available in all browsers. Check out http://kangax.github.io/compat-table/es6/ for a table showing the availability of this method (expand Array.prototype methods). Chrome and FireFox currently do not support it.