v1
- by milahu 9/7/202100
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
var dst = Array.from({ length: 1000 * 1000 })
var src = Array.from({ length: 1000 * 1000 }) // nodejs call stack = 100 * 1000

Array.prototype.pushAll = function (items) {
    let index = this.length
    for (const item of items) this[index++] = item
    this.length = index
    return this
}

Array.prototype.pushArrayOneSrc = function pushArray(other) {
  let c = 0; // count pushed elements
  for (let i = 0; i < other.length; i++) {
    this.push(other[i]);
    c++;
  }
  return c;
};


Array.prototype.pushArrayOneSrcNoCount = function pushArray(other) {
  for (let i = 0; i < other.length; i++) {
    this.push(other[i]);
  }
};

Array.prototype.pushArrayOneSrcNoCountForOf = function pushArray(other) {
  for (const e of other) {
	this.push(e);
  }
};

Array.prototype.pushArray = function pushArray(...otherList) {
  let c = 0; // count pushed elements
  for (let a = 0; a < otherList.length; a++) {
    const other = otherList[a];
    for (let i = 0; i < other.length; i++) {
      this.push(other[i]);
      c++;
    }
  }
  return c;
};
delete caserun single casemove downdrag and drop case


ready



dst = dst.concat(src)
delete caserun single casemove upmove downdrag and drop case


ready



dst = dst.concat(src)
delete caserun single casemove upmove downdrag and drop case


ready



dst = dst.concat(src)
delete caserun single casemove upmove downdrag and drop case


ready



dst = dst.concat(src)

delete caserun single casemove upmove downdrag and drop case


ready



dst.pushArrayOneSrcNoCount(src)

delete caserun single casemove upmove downdrag and drop case


ready



dst.pushArrayOneSrc(src)

delete caserun single casemove upmove downdrag and drop case


ready



dst.pushArray(src)
delete caserun single casemove upmove downdrag and drop case


ready



dst.pushAll(src)
delete caserun single casemove upmove downdrag and drop case


ready



dst.pushArrayOneSrcNoCountForOf(src)
delete caserun single casemove updrag and drop case


ready



dst = [...dst, ...src]

Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN