a blog for those who code

Saturday, 28 June 2014

Keyboard Control And Commands in Node.js (REPL)

In this article we will show you what are the keyboard controls and commands in Node.js also known as Read-eval-print-loop (REPL).


Keyboard Control in Node.js (REPL)

CTRL-C - This will terminate the current command. Pressing it twice will force you to exit.
CTRL-D - Exits Node.js (REPL)
tab  - Autocompletes the local and global variable which is declared.
UP arrow   - Helps you to traverse up through command history.
DOWN arrow  - Helps you to traverse down through command history.
Underscore(_) - It allows you to access the last expression.

Commands in Node.js (REPL)

.load - Load a file in current instance. Usage (.load path_of_your_file/name_of_your_file.js)
.save - Save the current Node.js session to a file. Usage (.save path_of_your_file/name_of_your_file.js)
.help - Displays all the available commands
.exit - Exit the Node.js (REPL)
.clear  - Clears all the expression written.


Please Like and Share the Blog, if you find it interesting and helpful.

No comments:

Post a Comment

Contact Us

Name

Email *

Message *

Sponsers

Best Hosting Plans

CC License