The reduce() method applies a function against an accumulator and each value of the array (from left-to-right) to _______ it to a single value.

  • multiply
  • concatenate
  • reduce
  • filter
The reduce() method in JavaScript is used to apply a function to an accumulator and each element of the array (from left to right) to reduce it to a single value. It's often used for tasks like summing up values or aggregating data. The correct option is reduce.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *