Using the code sample found here, when I run node server.js in the Command Prompt I get syntax errors.
First, it complains about =>. As far as I can see that's perfectly valid syntax, but if I change it to a standard anonymous function, it gets past that.
Second, it complains about the backticks in the console.log() line! Again, I believe this is correct syntax - I just read about template literals.
I'm a little embarrassed as this sounds like such a noob problem but can anyone (gently) tell me what stupid thing I've done?
Is it possible that an older version of node.js is on my system (one that only understands older syntax) and still taking precedence? If so, how can I find that out and correct it?
*** UPDATE ***
node -v reports "v0.12.2"... but I supposedly installed "20.11.1"... can the active version really be that old?!!
So it looks like the new install didn't set the newly-installed version as current... how can I fix that? I don't actually remember installing any previous version.
*** UPDATE 2 ***
My PATH had a path to both old and new versions of node.js, but the older one came first. This was my problem.
Removing the older one and restarting my Command Prompt has SOLVED the problem - their sample compiles as given now.