module 3 prototypes Flashcards
1
Q
What is Array.prototype.filter useful for?
A
The filter() method creates a new array with all elements that pass the test implemented by the provided function.
2
Q
What is Array.prototype.map useful for?
A
The map() method creates a new array populated with the results of calling a provided function on every element in the calling array.
3
Q
What is Array.prototype.reduce useful for?
A
for executing the same function in all the elements of an array and getting a single result back