hi my code doesnt pass and I dont know why:
const sum = (…z) => {
return z.reduce((a,b) => a + b , 0);
}
or
const sum = (…z) => z.reduce((a, b) => a + b, 0);
i tried both but it doesnt let go to next lesson
okay so 1st u should just create a new post as this is not a neat way to do things secondly here’s what i could find out:
1: for some reason you are using a set of different points are u perhaps using a different kind of keyboard?
…
should be
…
secondly:
return z.reduce((a,b) => a + b , 0);
}
const sum = (...z) => z.reduce((a, b) => a + b, 0);```
they both don’t have the args in them why did u delete it?
Your code is correct, you only have to change your z
back to the original args
provided by the challenge.
1 Like