Revision 126694 of for...in

  • Revision slug: Talk:JavaScript/Reference/Statements/for...in
  • Revision title: for...in
  • Revision id: 126694
  • Created:
  • Creator: Dleonard
  • Is current revision? No
  • Comment ordered enumeration

Revision Content

There is a <tt>for each (variable in list)</tt> statement in Gecko 1.8a2. It is meant for E4X compatibility but seems to be available for all types of lists. Maybe this should be documented? --Wladimir Palant 08:00, 21 Jul 2005 (PDT)

Breadcrumbs

As of this writing the breadcrumbs output on this article is wrong. I filed {{template.Bug(326770)}} regarding the issue. --Callek 20:33, 10 February 2006 (PST)

sorted enumeration

ECMA 262 says nothing about the order of <tt>for .. in</tt>'s enumerated attributes being lexicographically sorted/ordered, but all versions of JS appear to do this sorting. I've seen code that relies on it. Worth a documentation note?

Revision Source

<p>There is a <tt>for each (<var>variable</var> in <var>list</var>)</tt> statement in Gecko 1.8a2. It is meant for E4X compatibility but seems to be available for all types of lists. Maybe this should be documented?
--<a href="User:Wladimir_Palant">Wladimir Palant</a> 08:00, 21 Jul 2005 (PDT)
</p>
<h4 name="Breadcrumbs"> Breadcrumbs </h4>
<p>As of this writing the breadcrumbs output on this article is wrong.  I filed {{template.Bug(326770)}} regarding the issue. --<a href="User:Callek">Callek</a> 20:33, 10 February 2006 (PST)
</p>
<h4 name="sorted_enumeration"> sorted enumeration </h4>
<p>ECMA 262 says nothing about the order of <tt>for .. in</tt>'s enumerated attributes being lexicographically sorted/ordered, but all versions of JS appear to do this sorting. I've seen code that relies on it. Worth a documentation note?
</p>
Revert to this revision