{"ScriptPreparationCode":"a = [];\r\n\r\nfor (i = 0; i \u003C 1000; i\u002B\u002B) {\r\n a.push({\r\n reference: !!(i % 2),\r\n });\r\n}\r\n\r\nvar filtering = ({ reference }) =\u003E reference;\r\n\r\nvar mapping = (obj) =\u003E ({\r\n ref: obj.reference,\r\n});\r\n\r\nvar reducing = (acc, obj) =\u003E {\r\n if (filtering(obj)) acc.push(mapping(obj));\r\n return acc;\r\n};","TestCases":[{"Name":"filter-map","Code":"a.filter(filtering).map(mapping);","IsDeferred":false},{"Name":"reduce","Code":"a.reduce(reducing,[]);","IsDeferred":false}]}