215k views
4 votes
Which method accepts a function that combines all the elements in the array and then returns the resulting value?

a. filter()
b. reduce()
c. map()
d. forEach()

User Aybe
by
4.8k points

1 Answer

6 votes

Answer:

The method that accepts a function that combines all the elements in an array and then returns the resulting values is map() method.

Step-by-step explanation:

map() method creates a new array with the results of calling a provided function for every array element. map() element calls function for each array element to compute value.

User Novy
by
4.5k points