Skip to content

Instantly share code, notes, and snippets.

@iksnae
Last active December 20, 2015 04:39
Show Gist options
  • Save iksnae/6072338 to your computer and use it in GitHub Desktop.
Save iksnae/6072338 to your computer and use it in GitHub Desktop.
extending Array with a move( from, to ) function to reorder content in place
Array.prototype.move = function (from, to) {
this.splice(to, 0, this.splice(from, 1)[0]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment