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 which allow loop break and continue to skip a current iteration. for (let i = 0; i < arr.length; ++i) which allow object iteration as well as break and continue. for (let i in arr) which allow break and continue even on an empty array. do {code block to be executed}while ( condition ) which works based on a condition and allow break and continue. while( condition ) which does not have a loop break. arr.forEach((v, i) => { }) which as well allow for break and continue. for (const i of arr) From the 6 loops, the is the recommended method when dealing with arrays, sets and objects. Why? For one the forEach is a more functional and declarative syntax compared to the rest. This allows us to iterate through the entire arrays without skipping or breaking. In addition one is able to execute each element based on the element value or it index. how? forEach [ , , , , ].forEach( .log(index,value)); output 1 2 3 4 "df" ( ) => value, index console 0 1 1 2 2 3 3 4 4 'df' Most JavaScript Style Guide enforces this as the enforces the immutable rule as it is much reasonable to deal with pure functions that return a value with less side effects. forEach Why not use the other looping methods? inconsistency when dealing with empty value inside an array resulting to side effect. Given , the and the will return undefined on the empty value in the arrays while the skips the empty array. ["a", "", "b"] for (let i = 0; i < arr.length; ++i) for (const i of arr) for (let i in arr) when it comes to num-numeric key, the tends to print out a value rather than ignoring it. Declare an , modify it , print it out . Looping, , this will in fact return an output thus affirming our point that the use of in arrays is generally a bad practice. for (let i in arr) arr = ['a', 'b', 'c'] arr.test = "boy" [ 'a', 'b', 'c', test: 'boy' ] for (let i in arr) {console.log(arr[i]); } [ 'a', 'b', 'c', 'boy' ] for (let i in arr) There are more issues that i have not mentioned that strongly support the use of over the other looping methods. This are just some starting pointers for any developer who is still at the beginning of the learning process. Regardless, this is not to say that the is the final and only way, the main point to understand before choosing a looping function is the type of data that you will be working with, though it's advisable to always prefer the use JavaScript higher-order functions over or arr.forEach((v, i) => { }) arr.forEach((v, i) => { }) for-in for-of.