Arrays Flashcards

1
Q

What is Array.prototype.filter useful for?

A
  • filtering out an array/creating a new array while excluding some elements
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
  • returns an array of values where the callback function is called on each element
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
  • when you want to combine all elements of an array into a single value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly