Here you can find the source of removeMultiple(values)
Array.prototype.removeMultiple = function(values) { for (var i = 0; i < values.length; i++) {// w ww.j a v a 2 s . c o m this.splice(this.indexOf(values[i]), 1); i--; } }
Array.prototype.removeByKey = function(index) { var numToRemove = 1; return this.splice(index, numToRemove); };
Array.prototype.removeElement = function() var what, a = arguments, L = a.length, ax; while(L && this.length){ what= a[--L]; while((ax= this.indexOf(what))!= -1){ this.splice(ax, 1); return this; };
Array.prototype.removeElementByProperty = function(chave,obj) { var i = this.length; while (i--) { if (angular.equals(this[i][chave], obj)) { this.splice(i,1); };
Array.prototype.removeEmpty = function () { for (var i = 0; i < this.length; ++i) { if (this[i].replace(/^\s*$/, "") === "") { this.splice(i--, 1); return this; };
Array.prototype.removeEmpty = function() { var cleanArray = this.filter(function(n) { return (n !== undefined && n !== null && n !== ''); }); return cleanArray; };
Array.prototype.removeNegatives = function() { var negCount = 0; for (var index = 0; index < this.length; index++) { if(this[index] >= 0){ this[index - negCount] = this[index]; } else { negCount++ this.length = this.length-negCount; array2 = [-1,2.4,-3.1,4,-5.0,-6]; array2.removeNegatives(); console.log(array2);
Array.prototype.removeRange = function(start, end){
this.splice(start, end-start);
Array.prototype.removeSame = function() { let theNewArray = []; this.map((value, index, array) => { if (array.indexOf(value) === index) { theNewArray.push(value); }); return theNewArray; }; ...
Array.prototype.removeWhere = function (property, value) { "use strict"; for(var i = 0; i < this.length; i++) { if(this[i][property] === value) { this.splice(i, 1); break; }; ...