标签: javascript
告诉我,我需要重写这段代码,例如,在调用console.log (add (1) (2) (3))时,正确的数字是6,并且末尾没有空括号
console.log (add (1) (2) (3))
const add = (a) => { let sum = a; const func = b => { if (b) { sum += b; return func; } else { return sum; } }; return func; };