{"ScriptPreparationCode":"var array = Array.from({length: 40}, () =\u003E Math.floor(Math.random() * 140));\r\n\r\nvar arrayA = Array.from({length: 40}, () =\u003E Math.random().toString(36).substring(2, 15));","TestCases":[{"Name":"Set spread","Code":"const f = [... new Set(array)]\r\n\r\nconst z = [... new Set(arrayA)]","IsDeferred":false},{"Name":"Array from set","Code":"const s = new Set(array)\r\nconst l = Array.from(s)\r\n\r\nconst sa = new Set(array)\r\nconst la = Array.from(sa)","IsDeferred":false},{"Name":"Filter","Code":"const b = array.filter((i,index) =\u003E array.indexOf(i)=== index)\r\n\r\nconst ba = arrayA.filter((i,index) =\u003E arrayA.indexOf(i)=== index)","IsDeferred":false},{"Name":"Create Set","Code":"const ss = new Set(array)\r\n\r\nconst sc = new Set(arrayA)","IsDeferred":false},{"Name":"For","Code":"const s ={}\r\nconst lc = []\r\nfor(let i =0; i \u003C array.length; i\u002B\u002B){\r\n if (s[array[i]]) {\r\n \tcontinue\r\n }\r\n s[array[i]] = 1\r\n lc.push(s[array[i]])\r\n}\r\nconst sa ={}\r\nconst lca = []\r\nfor(let i =0; i \u003C arrayA.length; i\u002B\u002B){\r\n if (s[arrayA[i]]) {\r\n \tcontinue\r\n }\r\n sa[arrayA[i]] = 1\r\n lca.push(s[arrayA[i]])\r\n}","IsDeferred":false}]}