{"ScriptPreparationCode":"var array = Array.from({length: 410}, () =\u003E Math.floor(Math.random() * 140));\r\n\r\nvar arrayA = Array.from({length: 410}, () =\u003E Math.random().toString(36).substring(2, 15));\r\n\r\nvar arrayS = Array.from({length: 40}, () =\u003E Math.floor(Math.random() * 140));\r\n\r\nvar arraySA = Array.from({length: 40}, () =\u003E Math.random().toString(36).substring(2, 15));","TestCases":[{"Name":"Set spread num","Code":"const f = [... new Set(array)]\r\n\r\n","IsDeferred":false},{"Name":"Array set small ","Code":"const la = Array.from(new Set(arrayS))","IsDeferred":false},{"Name":"Array set small string","Code":"const la = Array.from(new Set(arraySA))","IsDeferred":false},{"Name":"For small","Code":"const sa ={}\r\nconst lca = []\r\nfor(let i =0; i \u003C arrayS.length; i\u002B\u002B){\r\n if (sa[arrayS[i]]) {\r\n \tcontinue\r\n }\r\n sa[arrayS[i]] = 1\r\n lca.push(sa[arrayS[i]])\r\n}","IsDeferred":false},{"Name":"For string small","Code":"const sa ={}\r\nconst lca = []\r\nfor(let i =0; i \u003C arraySA.length; i\u002B\u002B){\r\n if (sa[arraySA[i]]) {\r\n \tcontinue\r\n }\r\n sa[arraySA[i]] = 1\r\n lca.push(sa[arraySA[i]])\r\n}","IsDeferred":false},{"Name":"Create set small ","Code":"const scsdf = new Set(arrayS)","IsDeferred":false},{"Name":"Create set small string","Code":"const scsdfa = new Set(arraySA)","IsDeferred":false},{"Name":"Filter number small","Code":"const baas = arrayS.filter((i,index) =\u003E arrayS.indexOf(i)=== index)","IsDeferred":false},{"Name":"Filter string small","Code":"const baa = arraySA.filter((i,index) =\u003E arraySA.indexOf(i)=== index)","IsDeferred":false},{"Name":"Filter string","Code":"const ba = arrayA.filter((i,index) =\u003E arrayA.indexOf(i)=== index)","IsDeferred":false},{"Name":"Create set string","Code":"const sc = new Set(arrayA)","IsDeferred":false},{"Name":"For string","Code":"const sa ={}\r\nconst lca = []\r\nfor(let i =0; i \u003C arrayA.length; i\u002B\u002B){\r\n if (sa[arrayA[i]]) {\r\n \tcontinue\r\n }\r\n sa[arrayA[i]] = 1\r\n lca.push(sa[arrayA[i]])\r\n}","IsDeferred":false},{"Name":"Array set string","Code":"const la = Array.from(new Set(array))","IsDeferred":false},{"Name":"Set array","Code":"const z = [... 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\n","IsDeferred":false},{"Name":"Create Set","Code":"const ss = new Set(array)","IsDeferred":false},{"Name":"Filter","Code":"const b = array.filter((i,index) =\u003E array.indexOf(i)=== index)\r\n\r\n","IsDeferred":false},{"Name":"Array from set","Code":"const l = Array.from(new Set(array))\r\n\r\n","IsDeferred":false},{"Name":"Spread set small","Code":"const z = [... new Set(arrayS)]","IsDeferred":false},{"Name":"Spread set small string","Code":"const z = [... new Set(arraySA)]","IsDeferred":false}]}