What does `Array.prototype.reduce()` do?

JavaScript Associate Easy

JavaScript Associate — Easy

What does `Array.prototype.reduce()` do?

Key points

  • `reduce()` combines array elements into a single value
  • It requires a function to define the operation
  • The accumulator stores the result of each iteration

Ready to go further?

Related questions