23. create a sum()
Share
medium - accepted / - tried
Create a sum()
, which makes following possible
const sum1 = sum(1)sum1(2) == 3 // truesum1(3) == 4 // truesum(1)(2)(3) == 6 // truesum(5)(-1)(2) == 6 // true
Related Lists
the good and bad bits of JavaScript