Nodejs Array In in(ele)

Here you can find the source of in(ele)

Method Source Code

Array.prototype.in = function(ele) {
   for (var i=0; i<this.length; i++) {
      if (this[i] == ele) {
         return true;
      }// w  w w .  ja  va  2 s .  com
   }
   return false;
}

Related

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