Javascript Array contains(mxd,strict)

Description

Javascript Array contains(mxd,strict)


//Array prototype helper functions used in our code

Array.prototype.contains = function(mxd,strict) {
    for(i in this) {
  if(this[i] == mxd && !strict) return true;
   else if(this[i] === mxd) return true;
     }/*from  w  w w.j a v  a2  s .  c o m*/
    return false;
}



PreviousNext

Related