0
const cowSound = 'moo';
function makeSound() {
  console.log('My cow goes', cowSound);
  const cowSound = 'baa';
  console.log('My cow goes', cowSound);
}

makeSound();

VM174:3 Uncaught ReferenceError: Cannot access 'cowSound' before initialization

0 Answers0