what is the use off function currying in javascript code example
Example: what is currying in javascript example
Uses of currying function
a) It helps to avoid passing same variable again and again.
b) It is extremely useful in event handling.
syntax:
function Myfunction(a) {
return (b) => {
return (c) => {
return a * b * c
}
}
}
myFunction(1)(2)(3);