itLeeyw
itLeeyw
重写 forEach ```javascript Array.prototype.forEach = async function(callback, thisArg) { let bindThis, idx; if (this === null) { throw new TypeError('this is null or not defined'); } let arrayObj = Object(this);...
```javascript Array.prototype.map = function (callback, thisArg) { if (!this) throw TypeError('this 未定义或者为 null'); const bindThis = thisArg ?? null; const arrObj = Object(this); const len = arrObj.length >>> 0; let...
mark +1
> 不太懂lang,但是可以用"劳动法"/"加班费",表示类似None, null的空值。 老哥太狠了