{"ScriptPreparationCode":null,"TestCases":[{"Name":"4xMAP/REDUCE","Code":"const projectJobs = [];\r\n\r\nfor (var i = 0; i \u003C 10000; i\u002B\u002B) {\r\n projectJobs.push({\r\n availablePositions: 1,\r\n jobStage: {\r\n length: 1\r\n }\r\n });\r\n}\r\n\r\nconst teamTotalPosition = projectJobs.map(projectJob =\u003E projectJob.availablePositions).reduce(function (previous, current) {return previous \u002B current;}, 0);\r\n\r\nconst teamFilled = projectJobs.map(projectJob =\u003E projectJob.jobStage.length).reduce(function (previous, current) {return previous \u002B current;}, 0);","IsDeferred":false},{"Name":"1xCOMPLEX REDUCE","Code":"const projectJobs = [];\r\n\r\nfor (var i = 0; i \u003C 10000; i\u002B\u002B) {\r\n projectJobs.push({\r\n availablePositions: 1,\r\n jobStage: {\r\n length: 1\r\n }\r\n });\r\n}\r\n\r\nconst initialAccumulator = {\r\n teamTotalPosition: 0,\r\n teamFilled: 0,\r\n};\r\n\r\nconst {teamTotalPosition, teamFilled} = projectJobs.reduce(function (accumulator, pj) {\r\n return {\r\n teamTotalPosition: accumulator.teamTotalPosition \u002B pj.availablePositions,\r\n teamFilled: accumulator.teamFilled \u002B (pj.jobStage?.length || 0),\r\n };\r\n}, initialAccumulator);","IsDeferred":false}]}