docs: function insert(start, deleteCount, elements) {
      // `result` should have its length set to the `deleteCount`
      // see https://bugs.ecmascript.org/show_bug.cgi?id=332
      var deleteEnd = start + deleteCount,
          elementCount = elements ? elements.length : 0,
          index = start - 1,
          length = start + elementCount,
          object = this,
          result = Array(deleteCount),
          tail = slice.call(object, deleteEnd);
  
      // delete elements from the array
      while (++index < deleteEnd) {
        if (index in object) {
          result[index - start] = object[index];
          delete object[index];
        }
      }
      // insert elements
      index = start - 1;
      while (++index < length) {
        object[index] = elements[index - start];
      }
      // append tail elements
      start = index--;
      length = max(0, (object.length >>> 0) - deleteCount + elementCount);
      while (++index < length) {
        if ((index - start) in tail) {
          object[index] = tail[index - start];
        } else {
          delete object[index];
        }
      }
      // delete excess elements
      deleteCount = deleteCount > elementCount ? deleteCount - elementCount : 0;
      while (deleteCount--) {
        delete object[length + deleteCount];
      }
      object.length = length;
      return result;
    }