interate javascript array with index code example
Example: js loop array
let colors = ['red', 'green', 'blue'];
for (const color of colors){
console.log(color);
}
let colors = ['red', 'green', 'blue'];
for (const color of colors){
console.log(color);
}