1.
Array.prototype.contains = function(element){
return this.indexOf(element) > -1;
};
["toster", "tester", "mister"].contains("toster")
// True
2.
var myArr = ["toster", "tester", "mister"];
var tosterInArray = (myarr.indexOf("toster") > -1);
// True