{"ScriptPreparationCode":"arr = [...Array(50000)].map((v, i) =\u003E (i \u002B 1))\r\nfilter = (el) =\u003E el % 2 === 0","TestCases":[{"Name":"Reduce","Code":"arr.reduce(\r\n ([pass, fail], elem) =\u003E {\r\n if (filter(elem)) {\r\n return [[...pass, elem], fail];\r\n } else {\r\n return [pass, [...fail, elem]];\r\n }\r\n },\r\n [[], []],\r\n );","IsDeferred":false},{"Name":"Regular loop","Code":"const pass = [];\r\nconst fail = [];\r\n\r\nfor (let i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n if (filter(arr[i])) {\r\n pass.push(arr[i]);\r\n } else {\r\n fail.push(arr[i]);\r\n }\r\n}","IsDeferred":false},{"Name":"Of loop","Code":"const pass = [];\r\nconst fail = [];\r\n\r\nfor (const item of arr) {\r\n if (filter(item)) {\r\n pass.push(item);\r\n } else {\r\n fail.push(item);\r\n }\r\n}","IsDeferred":false},{"Name":"Of loop (let not const)","Code":"const pass = [];\r\nconst fail = [];\r\n\r\nfor (let item of arr) {\r\n if (filter(item)) {\r\n pass.push(item);\r\n } else {\r\n fail.push(item);\r\n }\r\n}","IsDeferred":false}]}