Javascript Array removeOneByPredicate(pr)
Array.prototype.removeOneByPredicate = function (pr) { var index = this.indexOf(this.first(pr)); if (index != -1) { this.splice(index, 1);//from w ww .j a v a 2s. c o m return true; } };