of in js code example Example: js for of const array1 = ['a', 'b', 'c']; for (const element of array1) { console.log(element); }