{"ScriptPreparationCode":"var array = new Array(10).fill(1)\r\n\r\nfunction withSpread(acc, item, index) {\r\n return {\r\n ...acc,\r\n [index]: {\r\n id: index,\r\n timestamp: new Date(new Date().getTime() \u002B (index * 1000)),\r\n isOdd: index % 2 === 0,\r\n isEven: index % 2 !== 0\r\n }\r\n };\r\n}\r\n\r\nfunction withOutSpread(acc, item, index) {\r\n acc[index] = {\r\n id: index,\r\n timestamp: new Date(new Date().getTime() \u002B (index * 1000)),\r\n isOdd: index % 2 === 0,\r\n isEven: index % 2 !== 0\r\n }\r\n return acc;\r\n}","TestCases":[{"Name":"reduce with spread","Code":"array.reduce(withSpread, {})","IsDeferred":false},{"Name":"reduce without spread","Code":"array.reduce(withOutSpread, {})","IsDeferred":false}]}