Comment Comment by sebilasse 'while' is actually faster than 'for'. But in this example the while loop does extra work (mutating the array). while loops are always faster than forEach, as they simply do less work. parent sebilasse 13 years ago