Artboard 16light, inspiration, solution, idea, innovation,ionicons-v5_logosGoogle 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.

Commands in the Node.js REPL

Learn more about these in the Node.js docs.

Was this TIL post helpful?
Yes? Cool! You might want to check out Web Weekly for more quick learnings. The last edition went out 14 days ago.

Related Topics

Related Articles