title: I Do not understand these two lines
body: <p>I Do not understand these two lines, whenever I use bcrypt to compare the hashed password to the received password, it did not work without these line that I can't understand.</p>
  <pre><code>const { password: hashedPassword } = result.rows[0];
        const isValidPassword = compareSync(
          `${password}${config.salt}`,
          hashedPassword
        );
  </code></pre>
  <p>how we used hashedPassword as a variable here and it is written as type</p>