Nodejs Array In inArray(value)

Here you can find the source of inArray(value)

Method Source Code

Array.prototype.inArray = function (value) {
     var i;/*from  w  ww. jav a 2s.  c  om*/
     for (i=0; i < this.length; i++) {
        if (this[i] == value) return true;
     }
     return false;
};

Related

  1. inArray(p_val)
    Array.prototype.inArray = function(p_val) {
      var l = this.length;
      for(var i = 0; i < l; i++) {
        if(this[i] == p_val) {
          return true;
      return false;
    
  2. inArray(val)
    Array.prototype.inArray = function(val) {
      var l = this.length;
      for(var i = 0; i < l; i++) {
        if(this[i] == val) {
          return true;
      return false;
    
  3. inArray(val)
    Array.prototype.inArray = function(val){
        for (var key in this){
            if(this[key] == val)
                return true;
        };
        return false;
    
  4. inArray(val)
    Array.prototype.inArray = function(val)
        return (this.indexOf(val) > -1)
    
  5. inArray(value)
    Array.prototype.inArray = function (value) {
      var i;
      for (i=0; i < this.length; i++) {
        if (this[i] === value) {
          return true;
      return false;
    };
    ...
    
  6. inArray(value)
    Array.prototype.inArray = function (value) {
      for (var i=0; i < this.length; i++) {
        if (this[i] === value) {
          return true;
      return false;
    };
    
  7. inArray(value)
    Array.prototype.inArray = function (value)  {
      var i;
      for (i=0; i < this.length; i++) {
        if (this[i] == value) {
          return true;
      return false;
    };
    ...
    
  8. inArray(value)
    Array.prototype.inArray = function (value) {
      for (var i=0; i < this.length; i++) {
        if (this[i] === value) {
          return true;
      return false;
    };
    
  9. inArray(value)
    Array.prototype.inArray = function(value) {
        var index = this.indexOf(value);
        if (index != -1) {
            return true;
        return false;