Nodejs Array Has Value hasValue(v)

Here you can find the source of hasValue(v)

Method Source Code

Array.prototype.hasValue = function(v)
{
   for(var idx in this)
   {//from  w w w . j av  a2s  .c  o m
      if(this[idx] == v)
         return true;
   }
   return false;
};

Related

  1. hasValue(pValue)
    Array.prototype.hasValue = function (pValue){
        var lArray = this || [];
        return lArray.indexOf(pValue) != -1;
    
  2. hasValue(val)
    Array.prototype.hasValue=function(val){
        for (var i in this){
            if(this[i]===val){
                return i
        return false
    
  3. hasValue(value)
    Array.prototype.hasValue = function(value) {
      var i;
      for (i=0; i<this.length; i++) { if (this[i] == value) return true; }
      return false;