Home/Tutorials/Node.js/REPL and Scripts

0 of 3 saved

Node.js5 min read

REPL and Scripts

Read this chapter, write the program on this page, then pass a short check to open the next one.

Run files with node.

REPL and Scripts

node file.js runs a script. The REPL is great for quick experiments. In this Learn path, Write tasks run like small scripts that print to stdout.

  • process.argv holds CLI args.
  • console.log is still your friend.
  • Exit with process.exit(code) only when needed.
console.log("node-ready");

After you read this chapter, use Write (when available) and Quiz on this page to lock it in.