of in for js code example
Example 1: for of loop in es6
let colors = ['Red', 'Blue', 'Green'];
for (let color of colors){
console.log(color);
}
Example 2: javascript for of
const numbers = [1,2,3,4];
for(const item of numbers){
console.log(item);
}