Skip to content

Instantly share code, notes, and snippets.

@mihar
Created October 5, 2011 04:02
Show Gist options
  • Save mihar/1263600 to your computer and use it in GitHub Desktop.
Save mihar/1263600 to your computer and use it in GitHub Desktop.
Remove element from array in JavaScript
Array.prototype.remove = function(element) {
this.splice(this.indexOf(element), 1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment