1const mul = (...args) => args.reduce((a, b) => a * b);
2
3// Example
4mul(1, 2, 3, 4); // 24
1function sum(...numbers) {
2 return numbers.reduce((accumulator, current) => {
3 return accumulator += current;
4 });
5};
6
7sum(1,2) // 3
8sum(1,2,3,4,5) // 15