Reputation: 705
When I install nodejs I download the following file:
node-v5.5.0-x64.msi
However, when I run "node -v"
v0.12.2
I downloaded some tutorial code on nodejs and I see they use the new javascript "let" statement instead of the old "var" keyword.
However, when I try to execute the javascript code in the tutorial, it does not work until I change all the "let" to "var".
Then it works.
(1) What version of nodejs did I download? v0.12 or v5?
(2) Should it support the new "let" statement?
(3) Is there a different version I can download that supports the "let" statement?
Thanks
Siegfried
Upvotes: 0
Views: 129
Reputation: 2779
What you're looking at in that filename is not actually Node.JS' version or NPM's version, but the release version of the installer bundle.
If you're having PATH
issues, as it seems you are, you can just let Node update itself:
npm update node npm update npm
And that will make the version in your PATH
the latest version.
Otherwise you can edit your environment variables manually:
See Editing PATH variable on Mac or Windows 7 - Add Path for more information on how to do that.
Upvotes: 1