• Tutorials Logic, IN
  • +91 8092939553
  • info@tutorialslogic.com

NodeJS REPL (Read Eval Print Loop)

NodeJS REPL

NodeJS REPL stands for Read Eval Print and Loop. It is a quick and easy way to test simple NodeJS code. To launch the NodeJS REPL, just open command prompt (In Windows) or terminal (In Mac or UNIX/Linux) and type node. It will change the prompt to node shell, where you can enter the NodeJS code and it will responds with an output in an interactive mode.

REPL CommandDescription
.helpIt will display list on all the commands.
Tab KeysIt will display the list of current commands.
Up/Down KeysIt is used to see the command history and modify previous commands.
.save filenameTo save current Node REPL session to a file.
.load filenameTo load the specified file in the current Node REPL session.
ctrl + cIt will terminate the current command.
ctrl + c (twice)It will help us to come out of Node REPL session.
ctrl + dIt will help us to come out of Node REPL session.
.breakIt is used to exit from multiline expression.
.clearIt is used to exit from multiline expression.