{"ScriptPreparationCode":"var arr = [];\r\nfor (var i = 0; i \u003C 2000; i\u002B\u002B) {\r\n arr[i] = i;\r\n}","TestCases":[{"Name":"reduce","Code":"\r\nsumReduce = arr.reduce((lastValue, item) =\u003E ({\r\n nb1: item % 2 == 0 ? lastValue.nb1 \u002B 1 : lastValue.nb1,\r\n nb2: item % 2 != 0 ? lastValue.nb2 \u002B 1 : lastValue.nb2,\r\n}), {nb1:0, nb2:0});\r\n\r\n","IsDeferred":false},{"Name":"filter","Code":"res = {\r\n nb1: arr.filter(item =\u003E item % 2 == 0).length,\r\n nb2: arr.filter(item =\u003E item % 2 != 0).length,\r\n}","IsDeferred":false}]}