how to iterate over an array javascript and add content code example
Example: loop array javascript
var colors = ['red', 'green', 'blue'];
colors.forEach((color, colorIndex) => {
console.log(colorIndex + ". " + color);
});
var colors = ['red', 'green', 'blue'];
colors.forEach((color, colorIndex) => {
console.log(colorIndex + ". " + color);
});