{"ScriptPreparationCode":"function hasWithIndexOf(needle, haystack) {\r\n\treturn haystack.indexOf(needle) !== -1;\r\n}\r\n\r\nfunction hasWithMap(needle, haystack) {\r\n\tvar map = {};\r\n\thaystack.forEach(item =\u003E map[item] = true);\r\n\treturn map[needle];\r\n}\r\n \r\nvar testArray = [\u0027001\u0027, \u0027002\u0027, \u0027003\u0027, \u0027004\u0027, \u0027005\u0027, \u0027006\u0027, \u0027007\u0027, \u0027008\u0027, \u0027009\u0027, \u0027010\u0027];","TestCases":[{"Name":"indexOf","Code":"for (var i=0; i\u003C100; \u002B\u002Bi) {\r\n\thasWithIndexOf(\u0027000\u0027, testArray);\r\n}","IsDeferred":false},{"Name":"map","Code":"for (var i=0; i\u003C100; \u002B\u002Bi) {\r\n\thasWithMap(\u0027000\u0027, testArray);\r\n}","IsDeferred":false}]}