Bcrypt Hash and Compare Passwords Synchronously

I’m not passing Bcrypt sync test:
Hi team!
I’m not passing Bcrypt sync test

// running tests
Sync hash should be generated and correctly compared.
// tests completed

Here is my code

‘use strict’;
const express = require(‘express’);
const bodyParser = require(‘body-parser’);
const fccTesting = require(‘./freeCodeCamp/fcctesting.js’);
const app = express();
fccTesting(app);
const saltRounds = 12;
const myPlaintextPassword = ‘sUperpassw0rd!’;
const someOtherPlaintextPassword = ‘pass123’;

const bcrypt = require(‘bcrypt’);

const salt = bcrypt.genSaltSync(saltRounds);
console.log("salt value: ", salt);

//Hash and Compare Passwords Asynchronously
// bcrypt.hash(myPlaintextPassword, saltRounds, (err, hash) => {
// console.log(hash);
// bcrypt.compare(myPlaintextPassword, hash, (err, res) => {
// console.log(res);
// });
// });

//START_ASYNC -do not remove notes, place code between correct pair of notes.

//END_ASYNC

//START_SYNC

let hash = bcrypt.hashSync(“myPlaintextPassword”, salt);
console.log(hash)

//END_SYNC
let result = bcrypt.compareSync(“myPlaintextPassword”, hash);
console.log(result);

Thank you very much. I appreciate you.

Your project link(s)

solution: boilerplate-bcrypt - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

Challenge: Hash and Compare Passwords Synchronously

Link to the challenge:

If I’m understanding correctly

let hash = bcrypt.hashSync(“myPlaintextPassword”, salt);

then you’re passing a string litteral instead of the constant

const myPlaintextPassword = ‘sUperpassw0rd!’;

Could that be it?