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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Array.prototype.reduce useful for?

A

To return a single output value from a given array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly