JavaScript is unfortunately not implemented all the methods we have available from C # or VB.NET. One is the method «Contains» from the lists. With this code you can extend the class «Array» of JavaScript to implement this method:
Array.prototype.contains = function(element) { for (var i = 0; i < this.length; i++) { if (this[i] == element) { return true; } } return false; }