Javascript Array pushIfNotExits(item)

Description

Javascript Array pushIfNotExits(item)


Array.prototype.pushIfNotExits = function(item) {
    return this.includes(item) ? this.length : this.push(item)
}



PreviousNext

Related