{"ScriptPreparationCode":"const array = []\r\nlet i = 10000\r\nwhile (i--) {\r\n array.push(i)\r\n}\r\n\r\nfunction whileLoop() {\r\n const newArray = []\r\n let i = array.length\r\n\r\n while (i--) {\r\n newArray.push(array[i])\r\n }\r\n return newArray\r\n}\r\n\r\nfunction forLoop() {\r\n const newArray = []\r\n for (let i = 0; i \u003C array.length; i\u002B\u002B) {\r\n newArray.push(array[i])\r\n }\r\n return newArray\r\n}\r\n\r\nfunction forOfLoop() {\r\n const newArray = []\r\n for (const item of array) {\r\n newArray.push(item)\r\n }\r\n return newArray\r\n}\r\n\r\nfunction forEachLoop() {\r\n const newArray = []\r\n array.forEach(item =\u003E {\r\n newArray.push(item)\r\n })\r\n}","TestCases":[{"Name":"For","Code":"forLoop()","IsDeferred":false},{"Name":"For.. of","Code":"forOfLoop()","IsDeferred":false},{"Name":"forEach","Code":"forEachLoop()","IsDeferred":false},{"Name":"While","Code":"whileLoop()","IsDeferred":false}]}