You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Array.prototype._push = function(...items) {
let O = new Object(this);
let len = O.length >>> 0; // 取整
let argCount = items.length >>> 0; // 取整
let E = O;
if (len + argCount > 2 ** 53 - 1) {
throw new TypeError("the number of array os over the max value restrocted!");
}
for(let i = 0; i < argCount; i++) {
E[len + i] = items[i];
len++;
}
O.length = len;
return len;
}
测试用例后面补上, 先手动测吧😀
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: