Using _________, you can condense an array into a single value, optionally starting with an initial value.

  • map
  • reduce
  • filter
  • forEach
The correct answer is reduce. This method allows you to condense the elements of an array into a single value, using a provided function. It is particularly useful for tasks like summing values or finding the maximum element.
Add your answer
Loading...

Leave a comment

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