const sum = (…a) => a.reduce((a, b) => a + b, 0);
console.log(sum(1, 2, 3)); // 6
my code is still not working
kindly show me what is wrong in it…
const sum = (…a) => a.reduce((a, b) => a + b, 0);
console.log(sum(1, 2, 3)); // 6
my code is still not working
kindly show me what is wrong in it…