{"ScriptPreparationCode":"const CHILDREN_COUNT = 1000;\r\nvar containerDom = document.createElement(\u0027div\u0027);\r\nfor (var i = 0; i \u003C CHILDREN_COUNT; i\u002B\u002B) {\r\n containerDom.appendChild(document.createElement(\u0027span\u0027));\r\n}\r\ndocument.body.appendChild(containerDom);\r\nvar newContainerDom = document.createElement(\u0027div\u0027);","TestCases":[{"Name":"forEach loop childNodes","Code":"const childNodes = containerDom.childNodes;\r\nchildNodes.forEach(child =\u003E {\r\n newContainerDom.appendChild(child);\r\n});","IsDeferred":false},{"Name":"for loop childNodes","Code":"const childNodes = containerDom.childNodes;\r\nfor (let i = 0, len = childNodes.length; i \u003C len; i\u002B\u002B) {\r\n const child = childNodes[i];\r\n newContainerDom.appendChild(child);\r\n}","IsDeferred":false},{"Name":"loop firstChild and append","Code":"let firstChild = containerDom.firstChild;\r\nwhile (firstChild) {\r\n newContainerDom.appendChild(firstChild);\r\n firstChild = containerDom.firstChild;\r\n}","IsDeferred":false},{"Name":"loop lastChild and prepend","Code":"let lastChild = containerDom.lastChild;\r\nwhile (lastChild) {\r\n newContainerDom.prependChild(lastChild);\r\n lastChild = containerDom.lastChild;\r\n}","IsDeferred":false}]}