摘要: Array.prototype.reduceArr = function (fn, initValue) { if (Object.prototype.toString.call(fn) !== "[object Function]") { throw new Error('current para 阅读全文
posted @ 2021-03-01 11:47 abcdefgab 阅读(136) 评论(0) 推荐(0)
摘要: 实现call Function.prototype.myCall = function(thisArg, ...args) { const fn = Symbol('fn') // 声明一个独有的Symbol属性, 防止fn覆盖已有属性 thisArg = thisArg || window // 阅读全文
posted @ 2021-03-01 10:06 abcdefgab 阅读(64) 评论(0) 推荐(0)