> > But here comes the catch: While this is true with real JS arrays try > > it with a DOM nodelist and you will see that there is no speed > > difference between "my" method and the backward looping or two > > variable versions. > > Ah, that's interesting, I guess perhaps there's something about DOM > nodelists that makes calculating the length of them more expensive... Comparison: http://icant.co.uk/sandbox/forloops.html -- Chris Heilmann Book: http://www.beginningjavascript.com Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/