var string = "passw)odas4gsdfsdf";
{"ScriptPreparationCode":"var string = \u0022passw)odas4gsdfsdf\u0022;","TestCases":[{"Name":"RegEx","Code":"let isPasswordValid = false;\r\nconst number = new RegExp(\u0027(?=.*[0-9])\u0027);\r\nisPasswordValid = number.test(string);","IsDeferred":false},{"Name":"For Loop","Code":"let isPasswordValid = false;\r\nfor (let i = 0; i \u003C string.length; i\u002B\u002B)\r\n{\r\n \tif (string[i] \u003E= \u00270\u0027 \u0026\u0026 string[i] \u003C= \u00279\u0027)\r\n {\r\n isPasswordValid = true;\r\n break;\r\n }\r\n}","IsDeferred":false}]}