Return to Snippet

Revision: 8316
at September 13, 2008 01:41 by ianmonge


Initial Code
// 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);
};

Initial URL
http://ejohn.org/blog/javascript-array-remove/

Initial Description


Initial Title
Remove an item of array

Initial Tags
javascript, js, array

Initial Language
JavaScript