Advanced Array Methods Flashcards
1
Q
What is Array.prototype.filter useful for?
A
For extracting values that meet a certain criteria
2
Q
What is Array.prototype.map useful for?
A
For returning an array containing a version of values that meet a certain criteria
3
Q
What is Array.prototype.reduce useful for?
A
For returning a single value (that combines all the values down to one) that meets a certain condition