Skip to content

Conversation

@mattisfrommars
Copy link

No description provided.

});
};

MyArray.prototype.splice = function (startIndex, deleteCount) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a GOLD way to implement splice. Love it! Short, concise, and simple.

I would probably just make the middle part as a for loop + push, so that uninitiated in apply can understand it, as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants