12345678
Array.prototype.removeByElement = function(element) { for(var i=0; i<this.length; i++) { if (this[i] == element) { this.splice(i, 1); // (start position, select length) } } return this;}