Nodejs Array Clear clear()

Here you can find the source of clear()

Method Source Code

Array.prototype.clear = Array.prototype.clear || function() {
    this.length = 0;/*from  ww w .j  a va 2  s. c om*/
};

Related

  1. clear()
    Array.prototype.clear = function() {
        while(this[0]) {
            this.splice(0,1);
    function $(id) {
        return document.getElementById(id);
    Array.prototype.map_init = function() {
    ...
    
  2. clear()
    ;(function(){
    Array.prototype.clear = function() {
      for(var i=0,l=this.length;i<l;i++) {
        var r = this.pop();
        if(typeof(r)=='object')
          if(r.constructor.name=='Array')
            r = r.clear();
          else if('clear' in r) 
            r = r.clear();
    ...
    
  3. clear()
    Array.prototype.clear = function(){
        this.length = 0;
    };
    
  4. clear()
    Array.prototype.clear=function(){
      this.length=0;
    
  5. clear()
    Array.prototype.clear = function() {
      return this.splice(0,this.length);
    };
    
  6. clear()
    Array.prototype.clear = function () {
        this.length = 0;
        return this;
    }; 
    
  7. clear()
    Array.prototype.clear = function(){
      this.splice(0, this.length);
    
  8. Clear()
    Array.prototype.Clear = function()
        this.splice( 0, this.length );
    };