I'm currently learning about the "typeof" operator in JavaScript, but the tutorial I'm following gives me different results than what I'm seeing in my console. Using anything other than 'strings' returns undefined. There are a few things I've seen about Automatic Semicolon Insertion, but they seem a bit more complicated than my current issue. Sorry, this might sound silly to the veterans, but for some reason I can't find the answer to the problem.
VS Code Screen Shot
you are evaluating code in two different contexts: your module, where your variables exists with a value and in the console where they are undefined, hence the result you see. You can add to typeof
in your script directly to see the correct result.