I have a question about the problem that is about using rest operators with function parameters.
I rewrote the offered code with arrow notation, but one of the tests is not passing.
The sum function uses the … spread operator on the args parameter.
This is my code
const sum = (...argument) => argument.reduce((a, b) => a + b, 0); console.log(sum(1, 2, 3)); // 6
Any idea why is it not passing just that one test?
Thanks in advance