I am trying to set up VS Code and Node.js so I can actually start learning JavaScript. When I run this code console.log('Test'); in VS Code I get the following error message:
SyntaxError: Invalid or unexpected token
at Object.compileFunction (node:vm:360:18)
at wrapSafe (node:internal/modules/cjs/loader:1055:15)
at Module._compile (node:internal/modules/cjs/loader:1090:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
at Module.load (node:internal/modules/cjs/loader:1004:32)
at Function.Module._load (node:internal/modules/cjs/loader:839:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47
I have read somewhere that maybe I have some hidden characters so I installed ESLint, Gremlins, and Tabnine extensions with the hope to see some issues in that super simple code, but I could not.
Additionally, this code works perfectly well in the Browser>Terminal or in the Windows terminal. What I am missing here?