Nodejs Array Remove by Index remove(i)

Here you can find the source of remove(i)

Method Source Code

Array.prototype.remove = function(i) {
    if (typeof i != "number")
        i = this.indexOf(i);//  w  ww .j ava2  s . c  o m
    this.splice(i,1);
    return i;
}

Array.prototype.insert = function(v, i) {
    if (arguments.length == 1)
        i = this.length;
    this.splice(i,0,v);
    return i;
}

singleton = (function() {
    var s = { uid: 0 };
    return {
        uid: function () {
            return s.uid++;
        }
    };
})();

Related

  1. remove(index)
    Array.prototype.remove = function(index)
        this.splice(index,1);
    };
    
  2. remove(index)
    Array.prototype.remove = function(index) {
      this.splice(index, 1);
      return this;
    };
    
  3. remove(index)
    Array.prototype.remove = function(index) {
      return this.splice(index, 1);
    
  4. remove(index)
    'use strict';
    Array.prototype.remove = function (index) {
      return this.splice(index, 1);