for(...of...) loop code example
Example 1: javascipr for of
const array1 = ['a', 'b', 'c'];
for (const element of array1) {
console.log(element);
}
// expected output: "a"
// expected output: "b"
// expected output: "c"
Example 2: javascript for of
const numbers = [1,2,3,4];
for(const item of numbers){
console.log(item);
}