I need to have a window prompt the user if they want to use alphabetic characters when generating a suggested password, when I insert the following code into my javascript below, it executes the prompt, but doesnt maintain the while loop or execute the conditional statements, can anyone help?
while (vallidated === false) {
var usingChars = prompt("Hello! Would you like to use letters in your password? Y / N ")
if (useChars === 'y' || 'Y') {
usechars = true;
vallidated = true;
}
else if (usingChars === 'n' || 'N') {
useChars = false;
vallidated = true;
}
else {
prompt("Invalid input! Please enter the letter Y or N.")
}
}