Skip to content

Instantly share code, notes, and snippets.

@tcelestino
Last active December 13, 2015 19:08
Show Gist options
  • Save tcelestino/4959890 to your computer and use it in GitHub Desktop.
Save tcelestino/4959890 to your computer and use it in GitHub Desktop.
Remove item for array - by Andrey Knupp (https://github.com/andreyknupp)
Array.prototype.remove = function(i) {
var index;
if( ( index = this.indexOf( i ) ) !== -1 ) {
this.splice( index , 1 );
}
return this
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment