Nodejs Utililty Methods Array Erase

List of utility methods to do Array Erase

Description

The list of methods to do Array Erase are organized into topic(s).

Method

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