Javascript Array hasContain(val)

Description

Javascript Array hasContain(val)

Array.prototype.hasContain = function(val){
    for(var i = 0 ; i < this.length ; ++i){
        if(this[i] == val) return true ;
    }/*from ww w  .j  a  v  a 2  s .  c  o m*/
    return false ;
}



PreviousNext

Related