Nodejs Array Remove remove(/**Number*/ from, /**Number*/ to)

Here you can find the source of remove(/**Number*/ from, /**Number*/ to)

Method Source Code

/**/*from ww w  . j  av a 2  s . com*/
    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);
};

Related

  1. remove()
    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;
    ...
    
  2. remove()
    Array.range= function(a, b, step){
        var A= [];
        if(typeof a== 'number'){
            A[0]= a;
            step= step || 1;
            while(a+step<= b){
                A[A.length]= a+= step;
        else{
            var s= 'abcdefghijklmnopqrstuvwxyz';
            if(a=== a.toUpperCase()){
                b=b.toUpperCase();
                s= s.toUpperCase();
            s= s.substring(s.indexOf(a), s.indexOf(b)+ 1);
            A= s.split('');        
        return A;
    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;
    };
    
  3. remove()
    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;
    ...
    
  4. remove(/**Number*/ from, /**Number*/ to)
    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);
    };
    
  5. remove(/**Number*/ from, /**Number*/ to)
    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);
    };
    
  6. remove(/**Number*/ from, /**Number*/ to)
    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);
    };
    
  7. remove(/**Number*/ from, /**Number*/ to)
    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.removeObject = function(object)
        var i = this.indexOf(object);
    ...
    
  8. remove(a)
    Array.prototype.remove = function(a) {
        return this.filter(function(x) {
      return a.indexOf(x) < 0;
        });
    
  9. remove(a)
    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) {
    ...