Currying
Currying means breaking a function that takes multiple arguments into a series of functions that each take one argument
son take father property or grandfather property (StepByStep)
function Granfather(GFP){
return function(FP){
return function son(){
return `My owner ship is ${GFP} and ${FP}`
}
}
}
let result = Granfather(10)(100);
console.log(result());
Currying Function
1. Break function
2. Execute first Break, Out put of first Break as input Similar
Comments
Post a Comment