I'm pretty baffled by this question that I came across for my interview prep. It wants me to be able to write a function called multiply that takes in parameters in this haphazard way:
multiply(5)(6);
I tried to write a callback and then refer to this in the return statement, but it was not kosher.
function multiply(function(value){
return this * value;
});
}
Does this problem require recursion?
Thanks!