JS iterators (i.e. the for-of feature) (ES6)

JavaScript

Summary

Iterates over iterable objects (including arrays, array-like objects, iterators and generators), invoking a custom iteration hook with statements to be executed for the value of each distinct property.

Note: Turned on by default in WebKit nightly.

Demo

Documentation

Specification

Editor's draft

Implementation Status

Enabled by default in desktop Chrome 38 (launch bug)

Available in Chrome for Android release 38.

Consensus & Standardization

  • Firefox: Shipped
  • Internet Explorer: Public support
  • Opera: Shipped in release 25
  • Opera for Android: Shipped in release 25
  • Safari: In development
  • Web Developers: Strongly positive

Owner

Last updated on 2014-08-28