{"ScriptPreparationCode":null,"TestCases":[{"Name":"foreach","Code":"const items = Array.from({length: 100000}, () =\u003E Math.floor(Math.random() * 40));\r\nlet index = 0;\r\n\r\nitems.forEach(i =\u003E index\u002B\u002B);","IsDeferred":false},{"Name":"for-in","Code":"const items = Array.from({length: 100000}, () =\u003E Math.floor(Math.random() * 40));\r\nlet index = 0;\r\nconst newArray = [];\r\nfor (let i in items) {\r\n newArray.push(i);\r\n}","IsDeferred":false},{"Name":"for-of","Code":"const items = Array.from({length: 100000}, () =\u003E Math.floor(Math.random() * 40));\r\nlet index = 0;\r\nconst newArray = [];\r\nfor (let i of items) {\r\n newArray.push(i);\r\n}","IsDeferred":false},{"Name":"for","Code":"const items = Array.from({length: 100000}, () =\u003E Math.floor(Math.random() * 40));\r\nlet index = 0;\r\nconst newArray = [];\r\nfor(let i = 0; i \u003C items.length; \u002B\u002Bi) {\r\n newArray.push(items[i]);\r\n}","IsDeferred":false},{"Name":"optimized-for","Code":"const items = Array.from({length: 100000}, () =\u003E Math.floor(Math.random() * 40));\r\nlet index = 0;\r\nconst newArray = [];\r\nfor(let i = items.length; i \u003E 0; --i) {\r\n newArray.push(items[i]);\r\n}","IsDeferred":false},{"Name":"reduce","Code":"const items = Array.from({length: 100000}, () =\u003E Math.floor(Math.random() * 40));\r\n\r\nitems.reduce((acc,value) =\u003E {\r\n acc.push(value);\r\n return acc;\r\n}, new Array());","IsDeferred":false}]}