code: function TypedArray(arg1) {
  
          var result;
          if (typeof arg1 === 'number') {
              result = new Array(arg1);
              for (var i = 0; i < arg1; ++i) {
                  result[i] = 0;
              }
          } else {
              result = arg1.slice(0);
          }
          result.subarray = subarray;
          result.buffer = result;
          result.byteLength = result.length;
          result.set = set_;
          if (typeof arg1 === 'object' && arg1.buffer) {
              result.buffer = arg1.buffer;
          }
  
          return result;
      }
docs: we need typed arrays