Check if an array contains a value - Node.js Array

Node.js examples for Array:Array Value

Description

Check if an array contains a value

Demo Code

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

Related Tutorials