Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

What is currying in JavaScript

// Currying :
//- Currying is an advanced technique of working with functions.
function sum(a) {
  return function (b) {
    return function (c) {
      return function (d) {
        console.log("sun is:::", a + b + c + d);
      };
    };
  };
}
sum(5)(7)(3)(20);
 
PREVIOUS NEXT
Tagged: #What #currying #JavaScript
ADD COMMENT
Topic
Name
4+5 =