Running Node.js
Run a file with node file.js. node -e runs a snippet and node alone opens the REPL. Use node --watch to restart on change.
Example
console.log("Node", process.version.startsWith("v"));
console.log(typeof process.argv[0], process.argv.length);Result
Node true string 2
Exercise
Run a file.
node Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.