{"ScriptPreparationCode":null,"TestCases":[{"Name":"filter() then map()","Code":"const arr = [{a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}];\r\nconst filterMap = arr.filter(x =\u003E x.a !== 1).map(x =\u003E x.a)","IsDeferred":false},{"Name":"reduce() \u002B concat()","Code":"const arr = [{a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}];\r\nconst reduceConcat = arr.reduce((acc, val) =\u003E val.a === 1 ? acc : acc.concat([val.a]), []);","IsDeferred":false},{"Name":"reduce() \u002B push()","Code":"const arr = [{a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}];\r\nconst reducePush = arr.reduce((acc, val) =\u003E {\r\n if (val.a !== 1) acc.push(val.a);\r\n return acc;\r\n}, []);","IsDeferred":false},{"Name":"forEach","Code":"const arr = [{a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}, {a: 1}, {a: 2}, {a: 1}];\r\nlet result = []\r\nconst forEach = arr.forEach(val =\u003E {\r\n if (val.a !== 1) result.push(val.a);\r\n});","IsDeferred":false}]}