Web platform features explorer

Iterators and the for...of loop

Widely available since 2018-01-29
Tags: javascript Groups: JavaScript > Iterators

The for...of loop operates on a sequence of values sourced from an iterable object, such as arrays, array-like objects, DOM collections, iterators, generators, and user-defined iterables. All built-in iterators inherit from the Iterator class.

Browser support

  • Chrome 38 Released on 2014-10-07
  • Chrome Android 38 Released on 2014-10-08
  • Edge 12 Released on 2015-07-29
  • Firefox 13 Released on 2012-06-05
  • Firefox for Android 14 Released on 2012-06-26
  • Safari 7 Released on 2013-10-22
  • Safari on iOS 7 Released on 2013-09-18