{"ScriptPreparationCode":"var arr = [];\r\nfor (var i = 0; i \u003C 50000; i\u002B\u002B) {\r\n arr.push(i);\r\n}","TestCases":[{"Name":"map then forEach with spread","Code":"var objSpread = {};\r\nvar mapped = arr.map(item =\u003E ({ [item]: { exists: true }}));\r\nmapped.forEach(item =\u003E {\r\n\tobjSpread = { ...objSpread, ...item }; \r\n});","IsDeferred":false},{"Name":"reduce spread","Code":"var objReduce = arr.reduce((acc, item) =\u003E {\r\n var temp = { [item]: { exists: true } };\r\n return {...acc, ...temp };\r\n}, {});","IsDeferred":false},{"Name":"map then forEach with assign","Code":"var objAssign = {};\r\nvar mapped = arr.map(item =\u003E ({ [item]: { exists: true }}));\r\nmapped.forEach(item =\u003E {\r\n var key = Object.keys(item)[0];\r\n objAssign[key] = item[key] \r\n});","IsDeferred":false},{"Name":"reduce assign","Code":"var objReduce = arr.reduce((acc, item) =\u003E {\r\n var temp = { [item]: { exists: true } };\r\n var key = Object.keys(temp)[0];\r\n acc[key] = temp[key];\r\n return acc;\r\n}, {});","IsDeferred":false}]}