loop array in nodejs code example
Example 1: loop array javascript
var colors = ['red', 'green', 'blue'];
colors.forEach((color, colorIndex) => {
console.log(colorIndex + ". " + color);
});
Example 2: JavaScript array looping
var array = ['Volvo','Bmw','etc'];
for(var seeArray of array){
console.log(seeArray);
}