js for loop fast syntax code example
Example 1: javascript best way to loop through array
var len = arr.length;
while (len--) {
// blah blah
}
Example 2: javascript fastest loop
for (var i = 0, len = myArray.length; i < len; i++) {
}
var len = arr.length;
while (len--) {
// blah blah
}
for (var i = 0, len = myArray.length; i < len; i++) {
}