0
Write a sum method which will work properly when invoked using either syntax below.
console.log(sum(2,3)); // Outputs 5 console.log(sum(2)(3)); // Outputs 5
1 Odpowiedź
0
I don't think the second line is possible.
Maybe you could write something like sum(2)[3] but it would be very wrong and stupid