When using a for...of loop, what keyword is used to access the current item in the collection?
- for
- in
- of
- each
The for...of loop uses the "of" keyword to iterate over the values of an iterable object, providing a cleaner syntax compared to the for...in loop.
Loading...
Related Quiz
- How do higher-order functions contribute to a functional programming style in JavaScript?
- Can a class in ES6 contain constructor functions?
- How does ES6 module resolution differ between web browsers and Node.js environments?
- How does the static method Promise.all() work with multiple promises?
- Can Promises help in avoiding callback hell in asynchronous JavaScript code?