Javascript Array removeByElement(element)
Array.prototype.removeByElement = function (element) { for(var i=0; i<this.length;i++ ){ if(this[i]==element){ this.splice(i,1);//from www . j av a 2s . co m } } }