Nodejs Array Include includes(element)

Here you can find the source of includes(element)

Method Source Code

Array.prototype.includes = function(element) {
  return this.indexOf(element) !== -1;
};

Related

  1. include(val)
    Array.prototype.include = function(val) {
      return this.index(val) !== null;
    };
    
  2. include(value)
    Array.prototype.include = function(value){
      return(this.indexOf(value) != -1);
    };
    
  3. include(value)
    Array.prototype.include = function(value){
      return this.indexOf(value) !== -1;
    
  4. include(x)
    Array.prototype.include = function(x){
      return this.indexOf(x) > -1
    
  5. includes(array)
    Array.prototype.includes = function(array) {
      for ( var i = 0; i < this.length; i++) {
        for ( var k = 0; k < array.length; k++) {
          if ( this[i] == array[k]) {
            return true;
      return false;
    ...
    
  6. includes(item)
    Array.prototype.includes = function(item) {
        return this.indexOf(item) > -1;
    
  7. includes(matcher)
    Array.prototype.includes = function(matcher) {
      var includes = false
        , arr = this;
      for( var j = 0, str; str = arr[j++]; ) {
        if( typeof str === "string" && str.includes(matcher) ) {
          includes = true;
      return includes;
    ...
    
  8. includes(s)
    Array.prototype.includes = function(s) {
        return this.indexOf(s) > -1;
    };
    
  9. includes(searchElement /*, fromIndex*/ )
    Array.prototype.includes = Array.prototype.includes || (function(searchElement  ) {
      var O = Object(this);
      var len = parseInt(O.length, 10) || 0;
      if (len === 0) return false;
      var n = parseInt(arguments[1], 10) || 0;
      var k;
      if (n >= 0) {
        k = n;
      } else {
    ...