Exploring REPL Terminal

Shailendra Chauhan  Print   1 min read  
31 Dec 2015
29 Aug 2018

REPL stands for Read-Eval-Print-Loop. It is an interface to run your JavaScript code and see the results. You can access REPL by simply runningNode.js command prompt and simply run command node.

Here, we are adding two numbers 1 and 2 which results into 3.

REPL Commands

It shows REPL options and commands.
It helps you to exit from multiline expression when you get stuck.
It is an alias for .break.
Exit the REPL
It will help you to load JS code form a file into the REPL session.
It will save all evaluated command in the REPL session.

REPL Shortcuts

Ctl + d
It will terminate the REPL session.
Up/Down Keys
It will iterate through command history.
It will display the list of current available commands.
What do you think?

I hope you will enjoy commands and short-cuts while programming with Node.js. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.

Share Article

Take our free skill tests to evaluate your skill!

In less than 5 minutes, with our skill test, you can identify your knowledge gaps and strengths.

Training Schedules
+91 9999123502
Accept cookies & close this