题解 | #柯里化#
柯里化
https://www.nowcoder.com/practice/bb78d69986794470969674a8b504ac00
// 填写JavaScript function curryIt(fn) { let args = []; return function func(n){ args.push(n); if(args.length===fn.length){ return fn.apply(this,args); } return func; } } var fn = function (a, b, c) { return a + b + c }; curryIt(fn)(1)(2)(3);