Exploring REPL Terminal

Exploring REPL Terminal

01 May 2024
Beginner
9.06K Views
1 min read
Learn with an interactive course and practical hands-on labs

Node.js Course

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.

Read More - Node JS Interview Questions for Experienced

REPL Commands

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

REPL Shortcuts

Shortcut
Description
Ctl + d
It will terminate the REPL session.
Up/Down Keys
It will iterate through command history.
Tab
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.

Take our Nodejs skill challenge to evaluate yourself!

In less than 5 minutes, with our skill challenge, you can identify your knowledge gaps and strengths in a given skill.

GET FREE CHALLENGE

Share Article
About Author
Shailendra Chauhan (Microsoft MVP, Founder & CEO at Scholarhat by DotNetTricks)

Shailendra Chauhan is the Founder and CEO at ScholarHat by DotNetTricks which is a brand when it comes to e-Learning. He provides training and consultation over an array of technologies like Cloud, .NET, Angular, React, Node, Microservices, Containers and Mobile Apps development. He has been awarded Microsoft MVP 9th time in a row (2016-2024). He has changed many lives with his writings and unique training programs. He has a number of most sought-after books to his name which has helped job aspirants in cracking tough interviews with ease.
Accept cookies & close this