I am having difficulty with the answer provided here, but I couldn't understand how to implement it. My code is pretty much identical:
The problem with this is, if you were to Inspect Element on the page, you can plainly see the password. I'm not looking for other solutions like a SQL database, because this is just a test website. The solution I thought might work was this:
if(hash(enteredPassword) == storedHash)
I just don't know how to implement it.