mozilla

Compare Revisions

for...in

Change Revisions

Revision 303745:

Revision 303745 by Mortchek on

Revision 320355:

Revision 320355 by magnetik on

Title:
for...in
for...in
Slug:
JavaScript/Reference/Statements/for...in
JavaScript/Reference/Statements/for...in
Content:

Revision 303745
Revision 320355
t90        Because the order of iteration is implementation dependent90        Because the order of iteration is implementation dependen
>t, iterating over an array may not visit elements in a consistent>t, iterating over an array may not visit elements in a consistent
> order. Therefore it is better to use a <a href="/en/JavaScript/R> order. Therefore it is better to use a <a href="/en/JavaScript/R
>eference/Statements/for" title="en/JavaScript/Reference/Statement>eference/Statements/for" title="en/JavaScript/Reference/Statement
>s/for">for</a> loop with a numeric index (or the non-standard <co>s/for">for</a> loop with a numeric index (or <a href="/en-US/docs
>de><a href="/en-US/docs/JavaScript/Reference/Statements/for...of">/JavaScript/Reference/Global_Objects/Array/forEach" title="/en-US
> title="/en-US/docs/JavaScript/Reference/Statements/for...of">for>/docs/Reference/Global_Objects/Array/forEach">Array.forEach</a> o
>...of</a></code> loop) when iterating over arrays where the order>r the non-standard <code><a href="/en-US/docs/JavaScript/Referenc
> of access is important.>e/Statements/for...of" title="/en-US/docs/JavaScript/Reference/St
 >atements/for...of">for...of</a></code> loop) when iterating over 
 >arrays where the order of access is important.

Back to History