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.
Loading...
Related Quiz
- Which design principle is violated if a superclass is aware of its subclasses?
- You've encountered a "Callback Hell" in a project you've inherited. What could be a strategic approach to refactor and manage the nested callbacks for better readability and maintainability?
- To select elements with a specific class name, you should use the __________ method.
- Which HTTP status code represents a successful GET request?
- If you’re using arrow functions to define methods inside a class, those methods will not have access to the class’s instance without using _________.