Javascript Array has(item)

Description

Javascript Array has(item)


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

Javascript Array has(item)

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



PreviousNext

Related