in_array()

This is a Javascript snippet, talking about array and prototype

in_array() Add to Favorite

Array.prototype.in_array = function(p_val)
{
    for(var i = 0, l = this.length; i < l; i++)
    {
        if(this[i] == p_val)
        {
            return true;
        }
    }
    return false;
}

How to implement in_array function in javascript

Created by ThePeppersStudio (396 days, 11.19 hours ago)

Do you want to leave a message? Please login first.