a blog for those who code

Wednesday, 23 September 2015

How to clear node.js console on Windows

In this post we are going to discuss about how to clear node.js console on windows. Node.js is a platform for building fast, scalable network application. When you install Node.js in your windows machine you will get Node.js Command Prompt and Node.js console application as shown below.


Difference Between Node.exe and Node.js Command Prompt

Node.js - This is a captive shell for testing and executing JavaScript code. It is the same as if you have typed node from the Command Prompt.

Node.js Command Prompt - This is a normal command prompt where where the path has been adjusted to include node.exe.

Also Read : Keyboard Control And Commands in Node.js (REPL)

Now suppose you have typed something (lets say node) in Node.exe and wanted to clear it.


Unlike Node.js Command Line, cls will not work in Node.exe.


To clear the Console of Node.exe on Windows you have to type  process.stdout.write('\033c').


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

No comments:

Post a Comment