What does the for…of loop iterate over?

JavaScript Associate Easy

JavaScript Associate — Easy

What does the for…of loop iterate over?

Key points

  • Iteration is limited to iterable values, not keys or indices.
  • The loop works with various data types, including arrays and strings.
  • It doesn't directly access object properties or array indices.
  • Maps and Sets are also supported, making it versatile.

Ready to go further?

Related questions