Here you can find the source of erase(item)
Array.prototype.erase = function (item) { for (var i = this.length; i--; i) { if (this[i] === item) { this.splice(i, 1);/* w w w .ja va 2s . co m*/ } } return this; };
Array.prototype.erase = function (item) { for (var i = this.length; i--; i) { if (this[i] === item) this.splice(i, 1); return this; };