{"ScriptPreparationCode":"var arr = [];\r\nfor (var i = 0; i \u003C 12345; i\u002B\u002B) {\r\n arr[i] = i;\r\n}\r\n\r\nfunction someFn(i) {\r\n return (i * 3 * 8 / 1200 * 0.002 / 40 * 0.2);\r\n}\r\n\r\nvar sumForEach = 0,\r\n sumReduce = 0,\r\n sumFilter = 0;","TestCases":[{"Name":"Reduce","Code":"var sources = arr.reduce(function(result, number) {\r\n if (number % 2 !== 0) {\r\n result.push(number);\r\n }\r\n return result;\r\n}, []);","IsDeferred":false},{"Name":"Filter","Code":"var sources = arr.filter(function(number) {\r\n if (number % 2 !== 0) {\r\n return false; // skip\r\n }\r\n return true;\r\n}).map(function(number) { return number; })","IsDeferred":false}]}