Nodejs Array In inArray()

Here you can find the source of inArray()

Method Source Code

Array.prototype.inArray = function() {
    for(var j in this) {
        if(this[j] == arguments[0]) {
            return true;
        }//w  w  w. j  a  v a  2s  .  co  m
    }
    return false;
}

Related

  1. in(ele)
    Array.prototype.in = function(ele) {
      for (var i=0; i<this.length; i++) {
        if (this[i] == ele) {
          return true;
      return false;
    
  2. in(elementToFind)
    Array.prototype.in = function(elementToFind) {
      for(var i = 0 ; i < this.length ; i++) {
        if(this[i] === elementToFind) {
          return true;
      return false;
    };
    
  3. inArr(item)
    Array.prototype.inArr = function (item){
        for (var i = 0; i < this.length; i++){
            if(this[i] === item){
                return true;
    
  4. inArray()
    Array.prototype.inArray = function()
      for (var j in this) { 
        if (this[j] == arguments[0]) { 
          return true;
      return false;     
    
  5. inArray(comparer)
    Array.prototype.inArray = function(comparer) { 
        for(var i=0; i < this.length; i++) { 
            if(comparer(this[i])) return true; 
        return false; 
    };
    
  6. inArray(comparer)
    Array.prototype.inArray = function(comparer) { 
        for(var i=0; i < this.length; i++) { 
            if(comparer(this[i])) return true; 
        return false; 
    };
    
  7. inArray(comparer)
    Array.prototype.inArray = function(comparer) { 
        for(var i=0; i < this.length; i++) { 
            if(comparer(this[i])) return true; 
        return false; 
    };