Here you can find the source of remove(/**Number*/ from, /**Number*/ to)
/**//from w w w. jav a 2 s. co m Removes a number of objects from the array @param from The first object to remove @param to (Optional) The last object to remove */ Array.prototype.remove = function(/**Number*/ from, /**Number*/ to) { var rest = this.slice((to || from) + 1 || this.length); this.length = from < 0 ? this.length + from : from; return this.push.apply(this, rest); }; /** Removes a specific object from the array @param object The object to remove */ Array.prototype.removeObject = function(object) { var i = this.indexOf(object); if (i) { this.slice(i, 1); } //for (var i = 0; i < this.length; ++i) //{ // if (this[i] === object) // { // this.remove(i); // break; // } //} }
Array.prototype.remove = function() { var what, a = arguments, L = a.length, ax; while (L && this.length) { what = a[--L]; while ((ax = this.indexOf(what)) !== -1) { this.splice(ax, 1); return this; ...
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); };
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); };
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); };
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); };
Array.prototype.remove = function(a) { return this.filter(function(x) { return a.indexOf(x) < 0; });
Array.prototype.remove = function(a) { for(i = 0; i < this.length; i++) { if (this[i] == a) { this.splice(i, 1); break; }; Array.prototype.lpad = function(n, e) { ...
Array.prototype.remove = function(arg){ var i=0,n=0; var arrSize = this.length; for(i=0;i<arrSize;i++){ if(this[i] != arg){ this[n++]=this[i]; if(n<i){ ...
Array.prototype.remove = function(arg, all){ for(var i = 0; i < this.length; i++){ if(this[i] === arg){ this.splice(i,1); if(!all) break; else i--; };