摘要: reduce Array.prototype.myReduce = function(fn,initVal){ if(typeof fn !== 'function'){ throw Error('Type Error') } const arr = this; if(arguments.lengt 阅读全文