{"ScriptPreparationCode":"var array = [];\r\nvar map = new Map();\r\nvar obj = {};\r\n\r\nfor (var i = 0; i \u003C 100; i\u002B\u002B){\r\n array.push(Math.floor(Math.random()* 100));\r\n map.set(i,true);\r\n obj[i]=true;\r\n}\r\nvar sorted = array.sort()\r\n\r\nfunction binaryIndexOf(searchElement) {\r\n\r\n \r\n var minIndex = 0;\r\n var maxIndex = this.length - 1;\r\n var currentIndex;\r\n var currentElement;\r\n \r\n while (minIndex \u003C= maxIndex) {\r\n currentIndex = (minIndex \u002B maxIndex) / 2 | 0;\r\n currentElement = this[currentIndex];\r\n \r\n if (currentElement \u003C searchElement) {\r\n minIndex = currentIndex \u002B 1;\r\n }\r\n else if (currentElement \u003E searchElement) {\r\n maxIndex = currentIndex - 1;\r\n }\r\n else {\r\n return currentIndex;\r\n }\r\n }\r\n \r\n return -1;\r\n}","TestCases":[{"Name":"Includes","Code":"sorted.includes(5)","IsDeferred":false},{"Name":"binary","Code":"binaryIndexOf.call(sorted, 5)","IsDeferred":false},{"Name":"Map.has()","Code":"map.has(5);","IsDeferred":false},{"Name":"Obj[]","Code":"obj[5]","IsDeferred":false}]}