Nodejs Array Append Item add(e)

Here you can find the source of add(e)

Method Source Code

Array.prototype.add = function (e) {
    this.push(e);//  w ww.  j a  va  2 s .  c om
};

Related

  1. appendUniqueObj(oneItem)
    Array.prototype.appendUniqueObj = function(oneItem)
      if (!this.contains(oneItem))
        this[this.length] = oneItem;
    
  2. append_all(from)
    Array.prototype.append_all=function(from) {
      for(var i=0;i<from.length;i++) {
        this.append(from[i]);
      return this;
    
  3. Append( arr )
    Array.prototype.Append = function( arr )
        for ( var i = 0; i < arr.length; i++ )
            this.push( arr[ i ] );
    };
    
  4. AddItem( item )
    Array.prototype.AddItem = function( item )
      var i = this.length ;
      this[ i ] = item ;
      return i ;
    
  5. add(a2)
    Array.prototype.add = function(a2) {
      var l1 = this.length;
      var l2 = a2.length;
      var len = (l1 < l2 ? l1 : l2);
      var result = new Array(len);
      for (var i = 0; i < len; i++) {
        result[i] = this[i] + a2[i];
      return result;
    ...
    
  6. add(el)
    Array.prototype.add = function(el) {
      this.push(el);
      return this;
    };
    
  7. add(el)
    Array.prototype.add = function (el) {
        var index = this.indexOf(el);
        if (index == -1) {
            this.push(el);
    };
    Array.prototype.remove = function (el) {
        var index = this.indexOf(el);
        if (index > -1) {
    ...
    
  8. add(element)
    Array.prototype.add = function(element) {
      var newSize = this.push(element);
      return newSize-1;
    
  9. add(elemento,duplicado)
    Array.prototype.add = function(elemento,duplicado) {
      if(duplicado===false){
        for (var i = 0; i < this.length; i++) {
          if(this[i]===elemento)
            return;
      this[this.length] = elemento;