using foreach to create a list javascript code example
Example: javascript foreach example
var colors = ["red", "blue", "green"];
colors.forEach(function(color) {
console.log(color);
});
var colors = ["red", "blue", "green"];
colors.forEach(function(color) {
console.log(color);
});