I mistakenly wrote a re-declaration of an argument as a const in a function and instead of throwing SyntaxError: Identifier \'bar\' has already been decla
Taken from here https://tylermcginnis.com/videos/var-let-const/
var is function scoped and if you try to use a variable declared with var before the actual declaration, you'll just get undefined. const and let are blocked scoped and if you try to use a const or let variable before the declaration you'll get a reference error.