DEV Community

Discussion on: Modern JavaScript, 10 things you should be using, starting today

Collapse
 
ale_zampa profile image
Ale Zampa • Edited

Last one you could use just .reduce and something like: return [1,2,3].reduce((acc,e)=>acc+e,0)