DEV Community

Discussion on: You don't need Array.reduce()

Collapse
 
theodesp profile image
Theofanis Despoudis

Actually, this is better as you can extract the reducer part
(a, n) => a + n as a function. The other way is not reusable.