Node.js examples for Array:Search
Check if element is present in Array.
Array.prototype.contains = function ( needle ) { for (var i in this) { if (this[i] === needle) return true; }//from w w w . ja v a 2 s . co m return false; };