for of mozilla code example
Example 1: for of loop in es6
let colors = ['Red', 'Blue', 'Green'];
for (let color of colors){
console.log(color);
}
Example 2: es6 for-of loop
for (let itme of list) {
...
}
let colors = ['Red', 'Blue', 'Green'];
for (let color of colors){
console.log(color);
}
for (let itme of list) {
...
}