Can I compare function parameters within my if statement?

Here is the code:

function howdy_doody(person) {
  let person = 'dog'
  if (person == { name: 'dog' }) {
    return 'hello'
  } else {
    return 'goodbye'
  }
}
howdy_doody({ name: 'dog' }); 

I’m expecting the output hello. I’ve tried declaring the person parameter (see code below) but get the identifier person has already been declared syntax error. I’m confused on if I can compare function parameters within an if statement or not.

Thanks