JS Built-ins
IteratorforOfbeginner

Iterator: for...of array

πŸ“– Usage Example
for (const x of [10, 20, 30]) {
  console.log(x)
}
// β†’ 10
// β†’ 20
// β†’ 30

for...of iterates over any iterable object using the iterator protocol to yield successive values.

Check for...of with array.