+ 1
Ques based on javascript.
Ques based on javascript.. Write a mul function which will produce the following outputs when invoked: console.log(mul(2)(3)(4)); // output : 24 console.log(mul(4)(3)(4)); // output : 48 Submit your answer .......
1 Answer
+ 2
A good question on closure functions in JavaScript!
function mul(i) {
return function(j) {
return function(k) {
return i * j * k;
}
}
}