function curry(fn,args){ var len = fn.length var args = args||[] return function(...args2){ let newArgs = args.concat(args2) return (newArgs.length<len)?curry.call(this,fn,newArgs):fn.apply(this,newArgs) } } function mulitFn(a,b,c){ return a*b*c } let mulit = curry(mulitFn) console.log(mulit(2)(3)(4))