Hello I've been trying to write a function to validate a string value. My code is below
function verifyPassword(){
passW = prompt ("Password:");
if (passW = 'Pass123'){
document.write ('Your password is correct');
}
else {
document.write ('Your password is incorrect');
}
}
verifyPassword();
But here I always seem to get the result as 'Your password is correct', no matter what I put.
Please can someone help me to resolve this issue?