Nodejs Array Empty Check isEmpty()

Here you can find the source of isEmpty()

Method Source Code

Array.prototype.isEmpty = function() {
    return this.length == 0;
}

Related

  1. isEmpty()
    Array.prototype.isEmpty = function () {
      return this.length === 0
    };
    Array.prototype.last = function () {
      if (this.length === 0) return null;
      return this[this.length - 1];
    };
    
  2. isEmpty()
    Array.prototype.isEmpty = function(){
      return (this.length === 0 );
    
  3. isEmpty()
    Array.prototype.isEmpty = function() {
        return (0 === this.length);
    
  4. isEmpty()
    Array.prototype.isEmpty = function() {
      return this.length == 0;
    };
    
  5. isEmpty()
    Array.prototype.isEmpty = function() { 
      return this.length < 1 
    };
    
  6. isEmpty()
    Array.prototype.isEmpty = function () {
        return this.length === 0;
    };
    
  7. isEmpty()
    Array.prototype.isEmpty = function() {
      return this.length == 0 ? true : false;
    };
    
  8. is_empty()
    Array.prototype.is_empty = function() {
      return is_empty(this);
    };