Nodejs Array Erase erase(item)

Here you can find the source of erase(item)

Method Source Code

Array.prototype.erase = function (item) {
    for (var i = this.length; i--; i) {
        if (this[i] === item) this.splice(i, 1);
    }//  w ww .j av a2s.com
    return this;
};

Related

  1. erase(item)
    Array.prototype.erase = function (item) {
        for (var i = this.length; i--; i) {
            if (this[i] === item) {
                this.splice(i, 1);
        return this;
    };