Javascript Array removeRef(item)

Description

Javascript Array removeRef(item)

Array.prototype.removeRef = function (item) {

    var array = this;
    for (var i = 0; i < array.length; i++) {

        if (array[i] === item) {
            array.splice(i, 1);/* ww  w. j  ava 2 s . c o m*/
            break;
        }
    }

};



PreviousNext

Related