HarryPotterSpoiler

By knetch Last update Jul 16, 2007 — Installed 155 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 2 posts, 2 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Ori Avtalion Scriptwright

Iterating over arrays using "for (x in arr)" is wrong, since it gives you the array methods as well.

Use this instead:
for (var i = 0; i < a.length; i++) {
// Do something with a[i]
}

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel