let colors = ['Red', 'Blue', 'Green'];
for (let color of colors){
console.log(color);
}
for (variable of iterable) {
statement
}
let items = ["a", "b", "c", "d"];
for(item of items)
{
console.log(item);
/*yields a b c d*/
}
for (let itme of list) {
...
}
(function() {
for (const argument of arguments) {
console.log(argument);
}
})(1, 2, 3);
// 1
// 2
// 3
const iterable = [10, 20, 30];
for (const value of iterable) {
console.log(value);
}