{"ScriptPreparationCode":"var arr = [];\r\nvar res = [];\r\n\r\nfor( var cpt = 0; cpt \u003C 1000; cpt\u002B\u002B ) {\r\n arr.push(Math.random());\r\n}","TestCases":[{"Name":"Simple for loop - Access index and value","Code":"res = [];\r\nconst len = arr.length;\r\nfor(let i = 0; i \u003C len; \u002B\u002Bi) {\r\n res[i] = arr[i];\r\n}\r\nconsole.log(res);","IsDeferred":false},{"Name":"Array.forEach - Access index and value","Code":"res = [];\r\narr.forEach((value, i) =\u003E {\r\n res[i] = value;\r\n});\r\nconsole.log(res);","IsDeferred":false},{"Name":"for-of \u002B Array.entries","Code":"res = [];\r\nfor(const [i, value] of arr.entries()) {\r\n res[i] = value;\r\n}\r\nconsole.log(res);","IsDeferred":false},{"Name":"for-of - Access value only","Code":"res = [];\r\nfor(const value of arr) {\r\n res.push(value);\r\n}\r\nconsole.log(res);","IsDeferred":false},{"Name":"Simple for loop - Access value only","Code":"res = [];\r\nconst len = arr.length;\r\nfor(let i = 0; i \u003C len; \u002B\u002Bi) {\r\n res.push(arr[i]);\r\n}\r\nconsole.log(res);","IsDeferred":false},{"Name":"Array.forEach - Access value only","Code":"res = [];\r\narr.forEach((value) =\u003E {\r\n res.push(value);\r\n});\r\nconsole.log(res);","IsDeferred":false}]}