how to loop an array if items will be takes out js code example
Example: loop through javascript 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);
}