Here you can find the source of remove()
/**/*from ww w. j a v a2 s.c o m*/ * This script is for use in backend administration functions. * * @author Michael Erwin Virgines <michael.erwinp@gmail.com> * @requires assets/libs/jquery/jquery-* * @requires assets/plugins/toastr/toastr.min.js * */ /* Utilities */ // Remove array item by value. Array.prototype.remove = 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; }; // Capitalize first letter of text. String.prototype.ucfirst = function() { return this.charAt(0).toUpperCase() + this.slice(1); } var admin_page = {}; var admin_app = {};
var toRemove = 1; Array.prototype.remove = function () { for (var i in this) { if (this[i] === toRemove) { this.splice(i, 1); var arr = [1, 2, 1, 4, 1, 3, 4, 1, 111, 3, 2, 1, '1']; ...
Array.prototype.remove = function() { var i, j, l, m; l = arguments.length; i = 0; while (i < l) { m = this.length; j = 0; while (j < m) { if (arguments[i] === this[j]) { ...
Array.prototype.remove= function(){ if(!Array.prototype.indexOf){ Array.prototype.indexOf= function(what, i){ i= i || 0; var L= this.length; while(i< L){ if(this[i]=== what) return i; ++i; return -1; 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.remove = 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.remove = function() { var count = 0; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (arg.constructor == Array) { for (var j = 0; j < arg.length; j++) count += this.remove(arg[j]); } else { var index = 0; ...
Array.range= function(a, b, step){ var A= []; if(typeof a== 'number'){ A[0]= a; step= step || 1; while(a+step<= b){ A[A.length]= a+= step; else{ var s= 'abcdefghijklmnopqrstuvwxyz'; if(a=== a.toUpperCase()){ b=b.toUpperCase(); s= s.toUpperCase(); s= s.substring(s.indexOf(a), s.indexOf(b)+ 1); A= s.split(''); return A; Array.prototype.remove = 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.remove = 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.remove = 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.remove = 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); };