Given this code:
var arr = []; for (var i = 0; i < 10000; ++i) arr.push(1);
Forwards
for (var i =
If you want to have them at same pace, you can do that for forward iteration;
for(var i=0, c=arr.length; i
So, your script won't need to take length of array on everystep.