Exploring REPL Terminal

Exploring REPL Terminal

01 May 2024
Beginner
9.17K 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, Founder and CEO of ScholarHat by DotNetTricks, is a renowned expert in System Design, Software Architecture, Azure Cloud, .NET, Angular, React, Node.js, Microservices, DevOps, and Cross-Platform Mobile App Development. His skill set extends into emerging fields like Data Science, Python, Azure AI/ML, and Generative AI, making him a well-rounded expert who bridges traditional development frameworks with cutting-edge advancements. Recognized as a Microsoft Most Valuable Professional (MVP) for an impressive 9 consecutive years (2016–2024), he has consistently demonstrated excellence in delivering impactful solutions and inspiring learners.

Shailendra’s unique, hands-on training programs and bestselling books have empowered thousands of professionals to excel in their careers and crack tough interviews. A visionary leader, he continues to revolutionize technology education with his innovative approach.
Accept cookies & close this