I'm trying to make a string that if b (the password) = a (hello) it will alert "jj" and if not "nope" but I can't figure out why it won't work. I know this isn't how passwords are properly stored.
<!DOCTYPE html>
<html>
<body>
<input type="button" value="run js" onclick="start()">
<br><br>
UserName: <input type="text" id="userName">
Password: <input type="password" id="pasWord">
<p>hello</p>
<button onclick="passWord()"></button>
<script>
function start() {
    var a = ("hello");
}
function passWord() {
    var b = document.getElementById("pasWord").innerHTML;
    if (a = b) {
        alert("jj");
    } else {
        alert("nope");
    }
}
</script>
</body>
</html>
 
     
     
     
    