Make a Custom Array without distorting the Original

  function MyArray () {
    var _arr = [].slice.call(arguments, 0);
    for( var i=0; i<_arr.length; i++ ) {
      this[i] = _arr[i];
    }
    var THIS = this;
    var max = arguments.length;
    Object.defineProperty(THIS, 'length', {
      enumerable: false,
      get: function() { 
        var keys = Object.keys(this);
        for(var i=0; i< keys.length; i++) {
            keys[i] = parseInt(keys[i], 10);
            if( !isNaN (keys)[i] ){
              if (keys[i] > max) {
              max = keys[i]
            }
          }
        }

        for( var i=0; i<max; i++ ) {
          if( !this[i] ) {
            this[i] = void 0;
          }
        }
        return max;
      },
      set: function(){
        max = arguments[0];
      }
    });


    this.splice = [].splice.bind(this);
    this.push   = [].push.bind(this);
    this.add    = [].push.bind(this);
    this.splice = [].slice.bind(this);
    this.pop    = [].pop.bind(this);

    this.addAll = function() {
      var arr = arguments[0];
      for (var i=0, j = this.length; i<arr.length; i++, j++) {
        this[j] = arr[i];
      }
    };
    return this;
  };


  MyArray.prototype = new Array;
  MyArray.prototype.constructor = MyArray;



  var collection = new MyArray(1, 2, 3, 4);


  console.log(collection);
  //true
  console.log(collection instanceof Array);
  //true
  console.log(collection instanceof MyArray);
  // true

  console.log("collection", collection);
  //[1,2,3,4];
  console.log("collection.length", collection.length);
  //4

  console.log("-------------------------1");


  collection.add("hello");
  console.log("pushed hello");
  //5
  console.log("collection.length", collection.length);
  //5
  console.log("collection[4]", collection[4]);
  //"hello"
  

  console.log("-------------------------2");


  collection.push("world");
  console.log("pushed world");
  console.log("collection.length", collection.length);
  //6
  console.log("collection[5]", collection[5]);
  //world
  console.log("collection", collection);
  //world



  console.log("-------------------------3");


  collection.addAll(["java", "script"]);
  console.log("pushed [java, script]");
  console.log("collection.length", collection.length);
  //8
  console.log("collection", collection);
  //[1,2,3,4,"hello", "world", "java", "script"]


  console.log("-------------------------4");



  collection[8] = "last";
  console.log("assigned collection[8] = 'last'  ");
  //9
  console.log("collection.length", collection.length);
  //9


  console.log("-------------------------5");



  console.log("collection.pop()", collection.pop());
  //"last"
  console.log("collection.length", collection.length);
  //8
  console.log("collection", collection);
  // [1,2,3,4,"hello", "world", "java", "script"]


  console.log("-------------------------6");
  console.log("Array.prototype.addAll", Array.prototype.addAll);
  //undefined