List of utility methods to do Array Remove Item
removeItem(item)Array.prototype.removeItem = function(item) { return this.remove(this.indexOf(item)); | |
removeItem(itemToRemove)'use strict'; Array.prototype.removeItem = function (itemToRemove) { var index = this.indexOf(itemToRemove); var itemFoundInArray = (index != -1); if (itemFoundInArray) { this.splice(index, 1); }; | |
removeItem(item_)Array.prototype.removeItem = function(item_) { var i = this.indexOf(item_); this.splice(i, 1); }; |