how to use for of in javascript

JavaScript
const array1 = ['a', 'b', 'c'];

for (const element of array1) {
  console.log(element);
}
Source

Also in JavaScript: