I have a higher order function , though the first case multiply(4,5) works as expected but is it possible to pass multiple argument like multiply(2)(4, 5). In this case the answer is 8, but can a curried function be created in such a way so that it gives 40 as result
function multiply(s) {
return function(b) {
return s * b;
}
}
console.log(multiply(4)(5))
console.log(multiply(2)(4, 5))