JavaScript splice, slice, shift, pop

These four functions are commonly used to copy or modify arrays in JavaScript. I generally have the signatures printed as a cheat sheet since I can never keep them all straight.

View code on GitHub

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s