New course! Every coder should learn Generative AI!
Try a free lesson+ 3
You need to grab the input in the password field when the submit button is pressed. Then,
var password = whatever the length of that input is.
Then you can write what you were thinking with:
if(password < 8)
{
// weak
}
else
{
// strong
}
You shouldn't say
!= 8
Because 9 or 17 is stronger, yet somehow weak?