// Using prototype to add a fucntion to a built-in object or override it
Array.prototype.inArray = function inArray(value) {
 for(i = 0; i < this.length; i++) {
 if(this[i] === value) {
 return true;
 }
 }
 return false;
}
var someArr = [1, 2, 4, 7, 9];
console.log(someArr.inArray(8));