use map to loop thru numbers array js code example
Example 1: iterate through list javascript
const array = ["hello", "world"];
for (item of array) {
//DO THIS
}
Example 2: javascript loop through array
const myArray = ['foo', 'bar'];
myArray.forEach(x => console.log(x));
//or
for(let i = 0; i < myArray.length; i++) {
console.log(myArray[i]);
}