public
Last active

Remove element from array in JavaScript

  • Download Gist
gistfile1.js
JavaScript
1 2 3
Array.prototype.remove = function(element) {
this.splice(this.indexOf(element), 1)
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.