I just coded a function using the Javascript for...of
loop, assuming it had been implemented in Chrome (as in Firefox 13).. It has not.
Does anyone know where i can find out if, and when it is scheduled for implementation?
When ES6 lands. for ... of
is a proposed feature of ES6.
ES6 should land in 2014 if you're lucky.
As for what you should use today, try
array.forEach(function (value) {
...
});
Or
Object.keys(object).forEach(function (key) {
value = object[key];
...
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With