{"ScriptPreparationCode":null,"TestCases":[{"Name":"for loop","Code":"function randomString(\r\n length = 10,\r\n allowed = \u0022ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\u0022\r\n) {\r\n let result = \u0022\u0022\r\n for (let i = 0; i \u003C length; i\u002B\u002B) {\r\n result \u002B= allowed.charAt(Math.floor(Math.random() * allowed.length))\r\n }\r\n return result\r\n}\r\n\r\n\r\nrandomString();","IsDeferred":false},{"Name":"while loop","Code":"function foo(\r\n length = 10,\r\n allowed = \u0022ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\u0022\r\n) {\r\n let result = \u0022\u0022\r\n let i=0;\r\n\r\n do {\r\n result \u002B= allowed.charAt(Math.floor(Math.random() * allowed.length))\r\n i \u002B=1;\r\n } while(i \u003C length)\r\n return result\r\n}\r\n\r\nfoo();","IsDeferred":false}]}