var string = "isAlphaNumeric2021"
{"ScriptPreparationCode":"var string = \u0022isAlphaNumeric2021\u0022","TestCases":[{"Name":"Regex","Code":"/^[a-z0-9]\u002B$/i.test(string)","IsDeferred":false},{"Name":"charCodeAt","Code":"function isAlphaNumeric(str) {\r\n for (let i = 0; i \u003C str.length; i\u002B\u002B) {\r\n let code = str.charCodeAt(i)\r\n if (!(code \u003E 47 \u0026\u0026 code \u003C 58) \u0026\u0026 // numeric (0-9)\r\n !(code \u003E 64 \u0026\u0026 code \u003C 91) \u0026\u0026 // upper alpha (A-Z)\r\n !(code \u003E 96 \u0026\u0026 code \u003C 123)) { // lower alpha (a-z)\r\n return false\r\n }\r\n }\r\n return true\r\n}\r\n\r\nisAlphaNumeric(string)","IsDeferred":false}]}