{"ScriptPreparationCode":"var arr = Array(10_000).fill(0)","TestCases":[{"Name":"reduce with new array","Code":"arr.reduce((acc, x) =\u003E [...acc, x, x], [])","IsDeferred":false},{"Name":"reduce with array mutation","Code":"arr.reduce((acc, x) =\u003E { acc.push(x); return acc; }, [])","IsDeferred":false},{"Name":"flatMap","Code":"arr.flatMap(x =\u003E [x, x])","IsDeferred":false},{"Name":"for","Code":"const newArray = [];\r\nfor (let i = 0; arr.length \u003E i; i\u002B\u002B) {\r\n newArray.push(arr[i]);\r\n}","IsDeferred":false},{"Name":"for-of","Code":"const newArray = [];\r\nfor (let x of arr) {\r\n newArray.push(x);\r\n}","IsDeferred":false},{"Name":"map","Code":"arr.map(x =\u003E x);","IsDeferred":false},{"Name":"forEach","Code":"const newArray = [];\r\narr.forEach(x =\u003E newArray.push(x));","IsDeferred":false},{"Name":"values (iterates over for-of)","Code":"const newArray = [];\r\nfor (let x of arr.values()) {\r\n newArray.push(x);\r\n}","IsDeferred":false}]}