array .enumerate() js code example
Example 1: iterate array javascript
array = [ 1, 2, 3, 4, 5, 6 ];
for (index = 0; index < array.length; index++) {
console.log(array[index]);
}
Example 2: javascript loop through array
let array = ['Item 1', 'Item 2', 'Item 3'];
for (let item of array) {
console.log(item);
}