if you go through all array how to code example
Example 1: loop through javascript array
let colors = ['red', 'green', 'blue'];
for (const color of colors){
console.log(color);
}
Example 2: how to iterate through an array in javascript
const array = ["one", "two", "three"]
array.forEach(function (item, index) {
console.log(item, index);
});