Skip to content

Instantly share code, notes, and snippets.

@dylanjha

dylanjha/array.remove.js

Last active Dec 18, 2015
Embed
What would you like to do?
Array.prototype.remove = function(o){
var i = this.indexOf(o)
, v = this[i];
this.splice(i, 1);
return v;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment