Here you can find the source of deleteAll()
Array.prototype.deleteAll = function(){ var arr = this; arr.splice(0,arr.length);//from www .j a v a 2 s .c o m }
Array.prototype.delete = function() { var arr = this; var todel = arguments[0]; if(todel && todel instanceof Array) { var arraux = []; for(var i=0; i<todel.length;i++) { arr.some(function(el, j){ if(el == todel[i]){ arraux.push(j+''); ...
'use strict'; Array.prototype.delete = function (index) { delete this[index]; this.splice(index, 1); return this; };
Array.prototype.deleteAt = function(index) { return this.splice(index, 1); };
Array.prototype.deleteItems = function (ids, filterEmpty = true) { var result = this.slice(); if (typeof ids === 'object' && ids.constructor === [].constructor) { ids.sort(function (a, b) { return b > a; }).forEach(function (value) { if (filterEmpty) { result.splice(value, 1); } else { ...
Array.prototype.delete_at = function(from, to) { var rest = this.slice((to || from) + 1 || this.length); this.length = from < 0 ? this.length + from : from; return this.push.apply(this, rest); Array.prototype.delete_if = function(matcher){ for(var i = 0; i < this.length; i++){ if(matcher(this[i])) { this.delete_at(i) ...