DEV Community

Discussion on: Code Snippets: Array.prototype.reduce()

Collapse
 
esdev profile image
Ethan Smith

Absolutely, the max numbers example in this article is only to show basic usage and syntax of the reduce method with a very simple use case. Using Math.max would likely be a better option for finding the maximum in most real programming scenarios.