Hi there, I'm currently working on creating a function to check the validity of a string input. This is what I have so far:
function validatePassword(){
passW = prompt ("Enter Password:");
if (passW == 'Pass123'){
document.write ('Your password is correct');
}
else {
document.write ('Your password is incorrect');
}
}
validatePassword();
However, no matter what input I provide, the function always outputs 'Your password is correct'. Can someone assist me in fixing this issue?