{"ScriptPreparationCode":"var arr = Array(10000).fill().map(() =\u003E Math.round(Math.random() * 2))","TestCases":[{"Name":"reduce","Code":"const result = arr.reduce((acc, val) =\u003E {\r\n\tif(val === 1) acc.push(val)\r\n return acc\r\n} , [])","IsDeferred":false},{"Name":"flatmap","Code":"const result = arr.flatMap((val) =\u003E {\r\n if(val !== 1) return []\r\n return val\r\n})","IsDeferred":false}]}