Artboard 16light, inspiration, solution, idea, innovation,Google Sheets iconSwift icon
Published at
Updated at
Reading time
1min
This post is part of my Today I learned series in which I share all my web development learnings.

Today my friend Dominik shared that there are special commands available in the Node.js REPL.

There are seven Node.js REPL commands:

  • .break
  • .clear
  • .exit
  • .help
  • .save
  • .load
  • .editor

My favorite is the .editor command which you can use to write JavaScript going beyond one line right in the REPL.

And then there's also .load and .save to store and restore REPL sessions. These commands come in handy when moving out of the REPL again to export the executed code or start a REPL session quickly with a given state.

Learn more about these in the Node.js docs.

Related Topics

Related Articles