{"ScriptPreparationCode":"var array = [{ name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }, { name: \u0027Me\u0027, id: 1 }, { name: \u0027You\u0027, id: 2 }, { name: \u0027Us\u0027, id: 3 }];","TestCases":[{"Name":"Filter-Map","Code":"const ids = array\r\n\t.filter(item =\u003E item.name === \u0027Me\u0027)\r\n\t.map(item =\u003E item.id);","IsDeferred":false},{"Name":"Reduce-Push","Code":"const ids = array\r\n\t.reduce((ids, item) =\u003E {\r\n \tif (item.name === \u0027Me\u0027) {\r\n ids.push(item.id);\r\n }\r\n return ids;\r\n }, []);","IsDeferred":false},{"Name":"Reduce-Concat","Code":"const ids = array\r\n\t.reduce((ids, item) =\u003E {\r\n \tif (item.name === \u0027Me\u0027) {\r\n return ids.concat(item.id);\r\n }\r\n return ids;\r\n }, []);","IsDeferred":false},{"Name":"Reduce-Spread","Code":"const ids = array\r\n\t.reduce((ids, item) =\u003E {\r\n \tif (item.name === \u0027Me\u0027) {\r\n return [...ids,item.id];\r\n }\r\n return ids;\r\n }, []);","IsDeferred":false},{"Name":"ForOf-Push","Code":"const ids = [];\r\n\r\nfor (const item of array) {\r\n if (item.name === \u0027Me\u0027) {\r\n ids.push(item.id);\r\n }\r\n}","IsDeferred":false}]}