var string = "passw)odas4gsdfsdf";
{"ScriptPreparationCode":"var string = \u0022passw)odas4gsdfsdf\u0022;","TestCases":[{"Name":"RegEx","Code":"let isPasswordValid = /(?=.*[0-9])/.test(string);","IsDeferred":false},{"Name":"For Loop","Code":"let isPasswordValid = false;\r\nfor (let i = string.length; i--;)\r\n{\r\n \tif (\r\n string[i] === \u00270\u0027 \u0026\u0026\r\n string[i] === \u00271\u0027 \u0026\u0026\r\n string[i] === \u00272\u0027 \u0026\u0026\r\n string[i] === \u00273\u0027 \u0026\u0026\r\n string[i] === \u00274\u0027 \u0026\u0026\r\n string[i] === \u00275\u0027 \u0026\u0026\r\n string[i] === \u00276\u0027 \u0026\u0026\r\n string[i] === \u00277\u0027 \u0026\u0026\r\n string[i] === \u00278\u0027 \u0026\u0026\r\n string[i] === \u00279\u0027 \u0026\u0026\r\n string[i] === \u00270\u0027 \r\n )\r\n {\r\n isPasswordValid = true;\r\n break;\r\n }\r\n}","IsDeferred":false},{"Name":"includes","Code":"let isPasswordValid = string.includes(\u00274\u0027);","IsDeferred":false},{"Name":"indexof","Code":"let isPasswordValid = string.indexOf(\u00274\u0027) \u003E -1;","IsDeferred":false}]}