DEV Community


Discussion on: Enough JavaScript to get you Started : #17 rest,spread and destructuring

larsonnn profile image
Lars Feldeisen • Edited

You could also write your sum function like that:

const sum = (...el) => el.reduce((a, c) => a + c);
Enter fullscreen mode Exit fullscreen mode
whoadarshpandya profile image
Adarsh Pandya Author

Nice idea ! reduce, map and bind are being written in upcoming article :)