Hash and Compare Passwords Synchronously issue

Tell us what’s happening:
Followed the instructions and still cannot pass it.

Your code so far


Your browser information:

Issue present in Safari and Chrome.

Challenge: undefined

Link to the challenge:

hi @isocolenco
i think you should log only the result

Hi, thanks for pointing this out - tried it and I still get the same

Sync hash should be generated and correctly compared.

try using the predefined const’s like:


var hash = bcrypt.hashSync(myPlaintextPassword, saltRounds);
var result = bcrypt.compareSync(myPlaintextPassword, hash);



I’ve run into this issue as well. Your suggestion didn’t fix it.


This is weird…

I compared my solution to the one in the hint and changed the name of the result var from “res” to “result” mimicking the hint solution. This didn’t change the app’s behavior on Repl.It but caused the app to pass fcc’s test. When I reverted the var’s name to “res”, fcc’s test failed again.

The hint solution uses let whereas I use var and the above weirdness happens in either case.

Not sure why changing the var’s name would make a difference in this case