for...of

  • Revision slug: JavaScript/Reference/Statements/for...of
  • Revision title: for...of
  • Revision id: 25586
  • Created:
  • Creator: evilpie
  • Is current revision? No
  • Comment 1 words removed

Revision Content

{{ non-standard_header() }}

Iterates over objects invoking a custom iteration hook for each distinct property, statements can be executed.

Statement
Implemented in: None
ECMA Version: ECMAScript 6th Edition proposal

Syntax

for (variable of object)
  statement

Revision Source

<p>{{ non-standard_header() }}</p>
<p>Iterates over objects invoking a custom iteration hook for each distinct property, statements can be executed.</p>
<table class="standard-table"> <tbody> <tr> <td class="header" colspan="2">Statement</td> </tr> <tr> <td>Implemented in:</td> <td>None</td> </tr> <tr> <td>ECMA Version:</td> <td>ECMAScript 6th Edition proposal</td> </tr> </tbody>
</table>
<h2>Syntax</h2>
<pre class="eval">for (<em>variable</em> of <em>object</em>)
  <em>statement</em>
</pre>
Revert to this revision