Nodejs Array Clear clear()

Here you can find the source of clear()

Method Source Code

Array.prototype.clear = function(){
   this.splice(0, this.length);/*ww  w. j  av  a 2s. c o m*/
}

Related

  1. clear()
    Array.prototype.clear = function(){
        this.length = 0;
    };
    
  2. clear()
    Array.prototype.clear=function(){
      this.length=0;
    
  3. clear()
    Array.prototype.clear = function() {
      return this.splice(0,this.length);
    };
    
  4. clear()
    Array.prototype.clear = Array.prototype.clear || function() {
        this.length = 0;
    };
    
  5. clear()
    Array.prototype.clear = function () {
        this.length = 0;
        return this;
    }; 
    
  6. Clear()
    Array.prototype.Clear = function()
        this.splice( 0, this.length );
    };