Node.js is a platform built on Chrome's V8 JavaScript engine that can be run via the command line.
Install v0.8.11 or newer using a package manager or by downloading an installer from nodejs.org.
You can test to see that Node installed correctly by running both node --version
and npm --version
via the command line. The npm (Node package manager) version will be different than node's version.
Also note that running node
by itself will enter into an interactive mode where you can type JavaScript to be executed. Pressing Ctrl-C twice will exit. Running node file.js
will execute the code in file.js
.