Javascript Array removeOne(el)
Array.prototype.removeOne = function (el) { var index = this.indexOf(el); if (index != -1) { this.splice(index, 1);/*from w ww. j a va 2 s . c om*/ return true; } };