Remove specific item in array

PHOTO EMBED

Thu Dec 16 2021 23:06:21 GMT+0000 (UTC)

Saved by @Explosion #javascript #array

// Array Remove - By John Resig (MIT Licensed)
Array.prototype.remove = function(from, to) {
  var rest = this.slice((to || from) + 1 || this.length);
  this.length = from < 0 ? this.length + from : from;
  return this.push.apply(this, rest);
};
content_copyCOPY

https://stackoverflow.com/questions/5767325/how-can-i-remove-a-specific-item-from-an-array