Array.prototype.Contain = function (item) { var arr = this; if (arr == null || arr.length == 0) { return false; } for (var i = 0; i < arr.length; i++) { if (arr[i] == item) { return true; } } return false; } Array.prototype.Remove = function (item) { var index = -1; for (var i = 0; i < this.length; i++) { if (this[i] == item) { index = i; break; } } if (index != -1) { this.splice(index, 1); } }