var colors=["red","blue","green"]; for (let i = 0; i < colors.length; i++) { console.log(colors[i]); }
var colors=["red","blue","green"]; for(let color of colors){ console.log(color) }
loop(food = 0; foodNeeded = 10) { if (food >= foodNeeded) { exit loop; // We have enough food; let's go home } else { food += 2; // Spend an hour collecting 2 more food // loop will then run again } }