Array's Flashcards
1
Q
What is Array.prototype.filter useful for?
A
To filter through an array and remove certain items that don’t pass the test implemented and create a new array of those items that pass
2
Q
What is Array.prototype.map useful for?
A
To create a new array off an array that runs a callback function on each item and returns the result
3
Q
What is Array.prototype.reduce useful for?
A
To return a single output value from a given array