javascript for loops and for-in loops code example
Example 1: javascript for of
const numbers = [1,2,3,4];
for(const item of numbers){
console.log(item);
}
Example 2: javascript for loop
var colors=["red","blue","green"];
for (let i = 0; i < colors.length; i++) {
console.log(colors[i]);
}