📜  JavaScript 代码示例中的柯里化是什么

📅  最后修改于: 2022-03-11 15:01:45.892000             🧑  作者: Mango

代码示例1
// 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);