Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 532125 of Iterator

  • Revision slug: Web/JavaScript/Reference/Global_Objects/Iterator
  • Revision title: Iterator
  • Revision id: 532125
  • Created:
  • Creator: dbruant
  • Is current revision? No
  • Comment

Revision Content

The Iterator constructor is a SpiderMonkey-specific feature. For future-facing usages, consider using for..of loops and the iterator protocol

Summary

The Iterator function.

Properties

Methods

next ( )
Returns an item .

Description

An overview of the usage is available on the Iterators and Generators page.

Revision Source

<div class="warning">
 The Iterator constructor is a SpiderMonkey-specific feature. For future-facing usages, consider using <a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of" title="/en-US/docs/Web/JavaScript/Reference/Statements/for...of">for..of</a> loops and the <a href="/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol">iterator protocol</a></div>
<h2 id="Summary">Summary</h2>
<p>The Iterator function.</p>
<h2 id="Properties">Properties</h2>
<h2 id="Methods">Methods</h2>
<dl>
 <dt>
  <code>next ( )</code></dt>
</dl>
<dl>
 <dd>
  Returns an item .</dd>
</dl>
<h2 id="Description">Description</h2>
<p>An overview of the usage is available on the <a href="/en-US/docs/JavaScript/Guide/Iterators_and_Generators" title="/en-US/docs/JavaScript/Guide/Iterators_and_Generators">Iterators and Generators</a> page.</p>
Revert to this revision