Javascript Array 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; }//from w ww .j a v a 2 s .c om } } return false; };