Array.prototype.has = function(value) { return this.indexOf(value) !== -1; }; Array.prototype.clear = function() { this.length = 0; return this; }; Array.prototype.remove = function(value) { var index = this.indexOf(value); if(index > -1) { this.splice(index, 1); } return this; };