{"ScriptPreparationCode":"function getRandomInt(max) {\r\n return Math.floor(Math.random() * max);\r\n}\r\n\r\nvar arr = [];\r\nfor(let i = 0; i \u003C 10000; i\u002B\u002B) {\r\n\t arr.push(getRandomInt(1000));\r\n}","TestCases":[{"Name":"Array.findIndex","Code":"const compare = (a,b) =\u003E a === b;\r\n\r\narr.filter((item, idx) =\u003E arr.findIndex(compare) === idx);","IsDeferred":false},{"Name":"Array.indexOf","Code":"arr.filter((item, idx) =\u003E arr.indexOf(item) === idx);","IsDeferred":false},{"Name":"Array.from(new Set(array))","Code":"Array.from(new Set(arr));","IsDeferred":false},{"Name":"Object-filter","Code":"const obj = {};\r\n\r\narr.filter((item) =\u003E {\r\n if(!obj[item]){\r\n obj[item] = true;\r\n return true;\r\n }\r\n return false;\r\n});","IsDeferred":false},{"Name":"Object-values","Code":"Object.values(arr.reduce((acc, item) =\u003E {\r\n if(!acc[item]){\r\n acc[item] = item;\r\n }\r\n return acc;\r\n}, {}));","IsDeferred":false}]}