Javascript Array indexOf= function(e)

Description

Javascript Array indexOf= function(e)



Array.prototype.indexOf= function(e) {
  for (var i = 0, l = this.length; i < l; i++) {
    if (this[i] === e) {
      return i;/*from   www. j a  va  2 s  .co  m*/
    }
  }
  return -1;
}



PreviousNext

Related