JavaScript: Currying Function
Fatima Alam
Posted on June 15, 2024
function outsideFunction(num1){
let acc = num1;
return function innerFunction1(num2){
acc+=num2;
return function innerFunction2(num3){
acc+=num3;
return acc;
}
}
}
outsideFunction(1)(2)(3);
💖 💪 🙅 🚩
Fatima Alam
Posted on June 15, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.