{"ScriptPreparationCode":"\r\nvar arr = new Array(1000);\r\nfor (let i = 0; i \u003C 1000; \u002B\u002Bi) {\r\n arr[i] = i % 2 === 0 ? true : null;\r\n}","TestCases":[{"Name":"filter with push","Code":" const result = [];\r\n for (const item of arr) {\r\n if (item != null) {\r\n result.push(item);\r\n }\r\n }\r\n return result;","IsDeferred":false},{"Name":"filter with reduce","Code":"return arr.reduce(\r\n (arr, item) =\u003E (item != null ? [...arr, item] : arr),\r\n [],\r\n);","IsDeferred":false}]}