{"ScriptPreparationCode":"function generateTestArray() {\r\n const result = [];\r\n for (let i = 0; i \u003C 24; \u002B\u002Bi) {\r\n result.push({\r\n a: i,\r\n b: i / 2,\r\n c: i * 2,\r\n });\r\n }\r\n return result;\r\n}","TestCases":[{"Name":".forEach","Code":"const array = generateTestArray();\r\nconst newArr = []\r\narray.forEach((x) =\u003E {\r\n newArr.push(x.a % 2 === 0 ? x : {d: x.a, e: x.b, f: x.c})\r\n});","IsDeferred":false},{"Name":"for..of","Code":"const array = generateTestArray();\r\nconst newArr = []\r\nfor(const x of array) {\r\n newArr.push(x.a % 2 === 0 ? x : {d: x.a, e: x.b, f: x.c})\r\n}","IsDeferred":false},{"Name":".map","Code":"const array = generateTestArray();\r\narray.map(x =\u003E x.a % 2 === 0 ? x : {d: x.a, e: x.b, f: x.c})","IsDeferred":false},{"Name":".map (destructuring)","Code":"const array = generateTestArray();\r\narray.map(({a,b,c}) =\u003E a % 2 === 0 ? {a, b, c} : {d: x.a, e: x.b, f: x.c})","IsDeferred":false},{"Name":".for (init array)","Code":"const array = generateTestArray();\r\nconst newArr = []\r\nfor (let i = 0; i \u003C array.length; \u002B\u002Bi) {\r\n newArr.push(array[i].a % 2 === 0 ? array[i] : {d: array[i].a, e: array[i].b, f: array[i].c})\r\n}","IsDeferred":false},{"Name":".reduce","Code":"const array = generateTestArray();\r\narray.reduce((p, x) =\u003E p.push(x =\u003E x.a % 2 === 0 ? x : {d: x.a, e: x.b, f: x.c}), []);","IsDeferred":false}]}