The Recommended Way to Iterate Over Arrays in JavaScript
Too Long; Didn't Read
When dealing with an array, there is a number of ways one can iterate through the elements starting from the first at index 0 all the way to the last element in the array. In my learning process I have come across 6 looping methods namely for (let i = 0; i < arr.length; ++i) which allow loop break and continue to skip a current iteration. The forEach is a more functional and declarative syntax compared to the rest of the methods. This allows us to execute through the entire arrays without skipping or breaking.