The Array type of JS does not have a method to determine whether it contains a certain string. The following code implements this function. Students in need can take a look:
Array.prototype.contains = function(v){ var b = false; for(var i=0;i<this.length;i++){ if(this[i] == v){ b = true; break; } } return b; };