A little ways back we got into discussing what the most efficient way to iterate using 'for i' was, and it appeared to me that we settled on something like so:
or:Code:for (var i = some.length-1; i > -1; --i)
I just realized that this should mean the same thing:Code:for (var i = some.length-1; i >= 0; --i)
and it worked!Code:for (var i = some.length-1; i+1; --i)



Reply With Quote

Due to the wacky values of i during execution, though, most of these are usually impractical.
Bookmarks