{"ScriptPreparationCode":"var itemsCount = 1e2;\r\nvar items = Array.from({ length: itemsCount }, () =\u003E Math.floor(Math.random() * itemsCount));","TestCases":[{"Name":"Javascript Array.reduce/Array.indexOf","Code":"items.reduce((list, item) =\u003E list.indexOf(item) \u003E -1 ? list : [...list, item], []);","IsDeferred":false},{"Name":"Lodash Uniq","Code":"_.uniq(items)","IsDeferred":false},{"Name":"function unique(arr)","Code":"function unique(arr) {\r\n var hash = {}, result = [];\r\n for ( var i = 0, l = arr.length; i \u003C l; \u002B\u002Bi ) {\r\n if ( !hash.hasOwnProperty(arr[i]) ) { //it works with objects! in FF, at least\r\n hash[ arr[i] ] = true;\r\n result.push(arr[i]);\r\n }\r\n }\r\n return result;\r\n}\r\nunique(items)","IsDeferred":false}]}