JavaScript · Senior · Question 52 of 75

What do iterator helpers like map.values().filter(...).take(3) give you?

Explanation

Iterator.prototype gained map, filter, take, drop, flatMap, reduce, toArray and more. They process items on demand, so take(3) on a huge or infinite generator stops early.

Further reading

Problem with a question

JavaScript · Senior · question 52

Test yourself

Take the JavaScript · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz