javascript es6 array of numbers loop more efficient 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++) {
}