sum(2,3) // prints 5 sum(2)(3) // this too prints 5 Write the function sum()
Sigiloso
function sum(a,b){ if(!b){ return function(b){ return a+b; } } else{ return a+b; } } //they asked me to do it again with recursion to handle more than 1 arguments where I failed.