Node.js examples for Array:Remove Element
Remove item from array
Array.prototype.removeItem = function (itemToRemove) { var index = this.indexOf(itemToRemove); var itemFoundInArray = (index != -1); if (itemFoundInArray) { this.splice(index, 1); // remove item at that index }/*from w w w. j a v a 2 s .c o m*/ };