{"ScriptPreparationCode":"/*your preparation JavaScript code goes here\r\nTo execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/\r\nasync function globalMeasureThatScriptPrepareFunction() {\r\n // This function is optional, feel free to remove it.\r\n // await someThing();\r\n}\r\n\r\nfunction isPrime(num) {\r\n for (let i = 2, s = Math.sqrt(num); i \u003C= s; i\u002B\u002B) {\r\n if (num % i === 0) {\r\n return false;\r\n }\r\n }\r\n return num \u003E 1;\r\n}","TestCases":[{"Name":"Re create array (declared using \u0022let\u0022)","Code":"const size = 10000;\r\nlet primeNumbers = [];\r\nfor (var i = 0; i \u003C size; i\u002B\u002B) {\r\n if (isPrime(i)) {\r\n \tprimeNumbers.push(i);\r\n }\r\n if (primeNumbers.length \u003E 10) {\r\n primeNumbers = [];\r\n }\r\n}","IsDeferred":false},{"Name":"Empty array (declared using \u0022const\u0022)","Code":"const size = 10000;\r\nconst primeNumbers = [];\r\nfor (var i = 0; i \u003C size; i\u002B\u002B) {\r\n if (isPrime(i)) {\r\n \tprimeNumbers.push(i);\r\n }\r\n if (primeNumbers.length \u003E 10) {\r\n primeNumbers.splice(0, primeNumbers.length);\r\n }\r\n}","IsDeferred":false}]}