Optimized loop, becouse only check the array lenght when initialized the loop (var i = 0, len = array.length;) insted of check it in every iteration
for(var i = 0, len = array.length; i < len; i++) { // loop body remains the same }