{"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":"object literal/res.push(arr[i]);","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]) ) {\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},{"Name":"object literal/res.length","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]) ) {\r\n hash[ arr[i] ] = true;\r\n result[result.length] = arr[i];\r\n }\r\n }\r\n return result;\r\n}\r\nunique(items)","IsDeferred":false}]}