how to make the sum in the c in an array code example
Example: sum of an array
const sum = (...args) => args.reduce((a, b) => a + b, 0);
console.log(sum(1,2,3)); // returns 6
const sum = (...args) => args.reduce((a, b) => a + b, 0);
console.log(sum(1,2,3)); // returns 6