Node.js examples for Array:Remove Element
Removes all elements with values contained in the given array
// Removes all elements with values contained in the given array Array.prototype.removeAll = function(values){ var ind;/* w ww .j a v a 2s . c o m*/ for(var i=0; i < values.length; i++){ ind = this.indexOf(values[i]); while(ind > -1){ this.remove(ind); ind = this.indexOf(values[i]); } } }