{"ScriptPreparationCode":"\r\nvar testArray = [];\r\nfor (var i = 0; i \u003C 10000; i\u002B\u002B) {\r\n testArray.push(Math.floor(i * 1000) \u002B 1)\r\n}","TestCases":[{"Name":"remove finding element using indexof","Code":"function removeElement(testArray, element) {\r\n return ( index = testArray.indexOf(element) !==-1) ? testArray.splice(index, 1):0; \r\n}\r\n\r\nremoveElement(testArray, 2000000);\r\n","IsDeferred":false},{"Name":"remove finding element using filter","Code":"function removeElement(testArray, element) {\r\n return testArray.filter(s =\u003E s !== element); \r\n}\r\n\r\nremoveElement(testArray, 2000000);","IsDeferred":false}]}