What will the for...of loop iterate over in an array?

  • Indexes of the array
  • Property names of the array
  • Values of the array
  • The array itself
The for...of loop is used to iterate over the values of an array, making it useful for accessing the elements directly. Unlike the for...in loop, which iterates over properties, for...of provides a simple way to loop through the contents of an array.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *