{"ScriptPreparationCode":"var arr = Array(10000).fill(1)","TestCases":[{"Name":"Reduce concat","Code":"arr.reduce((acc, x, index) =\u003E acc.concat(x, index % 2 ? x : []), [])","IsDeferred":false},{"Name":"FlatMap","Code":"arr.flatMap((x, index) =\u003E [x, index % 2 \u0026\u0026 x]).filter(Boolean)","IsDeferred":false},{"Name":"Reduce push","Code":"arr.reduce((acc, x, index) =\u003E { acc.push(x); if(index % 2) { acc.push(x) } return acc; }, [])","IsDeferred":false},{"Name":"Reduce spread","Code":"arr.reduce((acc, x, index) =\u003E index % 2 ? [x,...acc] : acc, [])","IsDeferred":false}]}