for (var i = 0; i < 3; i++) code example
Example: javascript loop
var colors=["red","blue","green"];
for(let color of colors){
console.log(color)
}
var colors=["red","blue","green"];
for(let color of colors){
console.log(color)
}