Iterating Array elements

ref – https://stackoverflow.com/questions/5349425/whats-the-fastest-way-to-loop-through-an-array-in-javascript

given array

filter

forEach

map

warning: map is for generating a new array, we manipulate each element, and the function generates a new array with those new changes.
Its purpose is not really for iterating an array. For completeness, it is included.

for loop

while loop