Nodejs Array Has has()

Here you can find the source of has()

Method Source Code

Array.prototype.has = function  {
  return this.indexOf(item) > -1
}

Related

  1. has(e)
    Array.prototype.has = function(e) {
      for(var i = 0; i < this.length; i++)
        if((e.equals) ? e.equals(this[i]) : e === this[i])
          return true;
      return false;
    };
    
  2. has(elem)
    Array.prototype.has = function(elem) {
      return this.indexOf(elem) !== -1;
    };
    
  3. has(elm)
    Array.prototype.has = function(elm) {
      return~~ this.indexOf(elm);
    };
    
  4. has(item)
    "use strict";
    Array.prototype.has = function (item) {
        return this.indexOf(item) > -1;
    };