Compare Revisions

A re-introduction to JavaScript (JS Tutorial)

Revision 18592:

Revision 18592 by Frappyjohn on

Revision 18593:

Revision 18593 by Johndr on

Title:
A re-introduction to JavaScript (JS Tutorial)
A re-introduction to JavaScript (JS Tutorial)
Slug:
JavaScript/A_re-introduction_to_JavaScript
JavaScript/A_re-introduction_to_JavaScript
Tags:
javascript
javascript
Content:

Revision 18592
Revision 18593
nn532      Another way to iterate is to use the <code>for ... in</code
 >> loop:
533    </p>
534    <pre class="eval">
535for (var i in a) {
536  // Do something with a[i]
537}
538</pre>
539    <p>
t535a[a.length] = item;t543a[a.length] = item;                 // same as a.push(item);

Back to History