Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can use the .clear() method in Node.js repl to clear the output. This method will clear the current output from the console and continue the new output from the next line. Another way to stop the output from being printed is to use the process.stdout.write() function instead of console.log(). This method allows you to control the output of the console and prevents the automatic newline that occurs with console.log().