Nodejs Array Remove by Index remove(index)

Here you can find the source of remove(index)

Method Source Code

'use strict';//from w  w w  . j a  v a  2s.  c om

Array.prototype.remove = function (index) {
   return this.splice(index, 1);
}

Related

  1. remove(i)
    Array.prototype.remove = function(i) {
        if (typeof i != "number")
            i = this.indexOf(i);
        this.splice(i,1);
        return i;
    Array.prototype.insert = function(v, i) {
        if (arguments.length == 1)
            i = this.length;
    ...
    
  2. remove(index)
    Array.prototype.remove = function(index)
        this.splice(index,1);
    };
    
  3. remove(index)
    Array.prototype.remove = function(index) {
      this.splice(index, 1);
      return this;
    };
    
  4. remove(index)
    Array.prototype.remove = function(index) {
      return this.splice(index, 1);
    
  5. remove(index)
    Array.prototype.remove=function(index){
      for(var i=0;i<this.length;i++){
        if(i==index){
          this.splice(i, 1);
          break;
    
  6. remove(n)
    Array.prototype.remove = function(n) {
      this.splice(this.indexOf(n), 1);
    };
    
  7. remove(n)
    Array.prototype.remove = function(n){
      for(var i in this){
        if(this[i]==n){
          this.splice(i,1);
          break;
      return this;
    
  8. remove(pos)
    Array.prototype.remove = function (pos) {
        this.splice(pos, 1);
        return this;
    };