array.js 245 B

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