pablocattaneo
9/28/2016 - 12:28 PM

Optimized loop, becouse only check the array lenght when initialized the loop (var i = 0, len = array.length;) insted of check it in every i

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
}