{"ScriptPreparationCode":"var arr = [];\r\nfor (var i = 0; i \u003C 10000; i\u002B\u002B) {\r\n arr.push(Math.floor(Math.random() * 1000) \u002B 1)\r\n}\r\narr.splice(5000, 0, 0)","TestCases":[{"Name":"filter (immutable)","Code":"var tempResult = arr.filter(v =\u003E v !== 0);","IsDeferred":false},{"Name":"indexOf and delete (will leave initial length of array) (mutable)","Code":"var index = arr.indexOf(0);\r\ndelete arr[index];\r\nvar tempResult = arr;","IsDeferred":false},{"Name":"indexOf and splice (mutable)","Code":"var index = arr.indexOf(0);\r\narr.splice(index, 1);\r\nvar tempResult = arr;","IsDeferred":false},{"Name":"indexOf and slice and spread (immutable)","Code":"var index = arr.indexOf(0);\r\nvar tempResult = [...arr.slice(0, index - 1), ...arr.slice(index\u002B1)]","IsDeferred":false}]}