{"ScriptPreparationCode":"var textAmount = 10000\r\nvar possibleLetters = \u0027ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 \u0027;\r\nvar getRandomLetter = function () {\r\n return Math.floor(Math.random() * possibleLetters.length);\r\n};\r\nvar getRandomString = function (length) {\r\n let randomString = \u0027\u0027;\r\n for (let i = 0; i \u003C length; i\u002B\u002B) {\r\n randomString \u002B= possibleLetters[getRandomLetter()];\r\n }\r\n return randomString;\r\n};\r\n\r\nvar finalString = getRandomString(1000);","TestCases":[{"Name":"Regex","Code":"for (let i = 0; i \u003C textAmount; i\u002B\u002B) {\r\n const string = getRandomString(1000);\r\n const regexStart = new RegExp(/^a/);\r\n regexStart.test(string);\r\n}","IsDeferred":false},{"Name":"startsWith","Code":"for (let i = 0; i \u003C textAmount; i\u002B\u002B) {\r\n const string = getRandomString(1000);\r\n string.startsWith(\u0027a\u0027);\r\n}","IsDeferred":false},{"Name":"Index0","Code":"for (let i = 0; i \u003C textAmount; i\u002B\u002B) {\r\n const string = getRandomString(1000);\r\n string[0] === \u0027a\u0027;\r\n}","IsDeferred":false}]}