{"ScriptPreparationCode":null,"TestCases":[{"Name":"with spread operator","Code":"const range = (from, to) =\u003E {\r\n const output = []\r\n for(var x = from; x \u003C to; x\u002B\u002B){\r\n output.push(x)\r\n }\r\n return output\r\n}\r\nrange(0, 30000).reduce((acc, num) =\u003E {\r\n return {\r\n ...acc,\r\n [num]: num\r\n }\r\n}, {})","IsDeferred":false},{"Name":"with mutation","Code":"const range = (from, to) =\u003E {\r\n const output = []\r\n for(var x = from; x \u003C to; x\u002B\u002B){\r\n output.push(x)\r\n }\r\n return output\r\n}\r\nrange(0, 30000).reduce((acc, num) =\u003E {\r\n acc[num] = num\r\n return acc\r\n}, {})","IsDeferred":false},{"Name":"with object assign","Code":"const range = (from, to) =\u003E {\r\n const output = []\r\n for(var x = from; x \u003C to; x\u002B\u002B){\r\n output.push(x)\r\n }\r\n return output\r\n}\r\nrange(0, 30000).reduce((acc, num) =\u003E {\r\n return Object.assign(acc, {[num]: num})\r\n}, {})","IsDeferred":false},{"Name":"with for...of loop","Code":"const range = (from, to) =\u003E {\r\n const output = []\r\n for(var x = from; x \u003C to; x\u002B\u002B){\r\n output.push(x)\r\n }\r\n return output\r\n}\r\n\r\nconst items = range(0, 30000);\r\nlet result = {};\r\nfor(let item of items) {\r\n result[item] = item;\r\n}","IsDeferred":false},{"Name":"with for loop","Code":"const range = (from, to) =\u003E {\r\n const output = []\r\n for(var x = from; x \u003C to; x\u002B\u002B){\r\n output.push(x)\r\n }\r\n return output\r\n}\r\n\r\nconst items = range(0, 30000);\r\nlet result = {};\r\nfor(let i = 0; i \u003C items.length; i \u002B= 1) {\r\n result[items[i]] = items[i];\r\n}","IsDeferred":false}]}