Please enable Javascript to correctly display the contents on Dot Net Tricks!

Exploring REPL Terminal

  Author : Shailendra Chauhan
Posted On : 31 Dec 2015
Total Views : 2,386   
 

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

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.



Free Interview Books
 
COMMENTS (0)
6 JUL
ASP.NET Core with Angular4 Development (Online)

7:00 AM-9:00AM IST(+5:30 GMT)

Know More
5 JUL
NodeJS with Angular4 Development (Online)

08:00 PM-09:30 PM IST(+5.30 GMT)

Know More
1 JUL
ASP.NET MVC with Angular4 Development (Online)

03:30 PM-05:30 PM IST(+5.30 GMT)

Know More
1 JUL
ASP.NET MVC with Angular4 Development (Classroom)

8:00 AM-10:00 AM

Know More
1 JUL
ASP.NET Core with Angular4 Development (Classroom)

3:00PM 5:00PM

Know More
1 JUL
Xamarin Forms : Build Cross-platform Apps (Classroom)

3:00 PM 5:00 PM

Know More
1 JUL
MEAN Stack 2 Development (Classroom)

11:00 AM-12:30 PM

Know More
30 JUN
ASP.NET MVC with Angular4 Development (Online)

07:00 AM-09:00 AM IST(+5.30 GMT)

Know More
29 JUN
Hadoop Development cum Administration (Online)

7:00 AM-9:00AM IST(+5:30 GMT)

Know More
26 JUN
Xamarin Forms : Build Cross-platform Apps (Online)

9:30PM- 11:00PM IST(+5:30GMT)

6 JUN
ASP.NET MVC with Angular4 Development (Online)

09:00 PM-11:00 PM IST(+5.30 GMT)(TT)

3 JUN
ASP.NET MVC with Angular4 Development (Classroom)

4:00 PM-5:30 PM Weekend

20 MAY
Angular2 and Angular4 Development (Online)

08:00 AM-10:00 AM IST(+5.30 GMT) Weekend

20 MAY
NodeJS with Angular4 Development (Classroom)

5:30 PM-7:00 PM Weekend

8 MAY
ASP.NET MVC with Angular4 Development (Online)

07:00 AM-09:00 AM IST(+5:30 GMT) M/W/F

2 MAY
ASP.NET Core Development (Online)

07:00 AM - 09:00 AM IST( TUS, THR)

29 APR
ASP.NET MVC with Angular2 Development (Classroom)

9:30 AM-11:00 AM

BROWSE BY CATEGORY
 
 
LIKE US ON FACEBOOK
 
+