The sum function uses the ... spread operator on the args parameter

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…

@khizaransari, Replace as a character or something with three periods ... - That should fix it.