loop through array javascript and show items code example
Example 1: javascript loop through array
const array1 = ['a', 'b', 'c'];
array1.forEach(element => console.log(element));
Example 2: javascript best way to loop through array
var len = arr.length;
while (len--) {
// blah blah
}