{"ScriptPreparationCode":"var array = [];\r\nfor (let i = 0; i \u003C 100000; i\u002B\u002B) {\r\n array.push(Math.floor((Math.random() * 10) \u002B 1));\r\n}","TestCases":[{"Name":"Using indexOf","Code":"array.filter((item, index) =\u003E array.indexOf(item) != index);","IsDeferred":false},{"Name":"Using lastIndexOf","Code":"array.filter((item, index) =\u003E array.lastIndexOf(item) != index);","IsDeferred":false},{"Name":"Using a Set","Code":"[...new Set(array)]","IsDeferred":false},{"Name":"Using a Map","Code":"const deduped = new Map();\r\n array.forEach((v) =\u003E {\r\n if (!deduped.has(v)) {\r\n deduped.set(v, v);\r\n }\r\n });\r\n return Array.from(deduped.values());","IsDeferred":false}]}