Javascript Array has(needle)

Description

Javascript Array has(needle)




Array.prototype.has = function(needle)
{
    for (var i = 0; i < this.length; i++)
    {/*from w  w  w  .j ava 2  s  .  co m*/
        if (this[i] == needle) return true;
    }
    return false;
};



PreviousNext

Related