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._fill = function (value, start = 0, end = this.length) {
end = end < 0 ? this.length + end : end
if (typeof start !== "number" || typeof end !== "number") {
return this
}
for (let i = start; i < end; i++) {
this[i] = value
}
return this
}
const arr = [3, 2, 1, 4]
console.log(arr._fill(1, 1, ));
The text was updated successfully, but these errors were encountered: