简体   繁体   English

使用 Node.js 清除控制台输出

[英]Clear console output using Node.js

I am trying to create a time display (h:mm:ss) with just using the console and not on a web page.我正在尝试仅使用控制台而不是在网页上创建时间显示 (h:mm:ss)。 The time should be set initially and from there display the time as it changes.最初应设置时间,然后在更改时显示时间。

When using the output console (in the web browser) or in vscode, is it possible for js or node.js to clear the console or the outputs in the console without using an extension?在使用输出控制台(在 Web 浏览器中)或在 vscode 中时,js 或 node.js 是否可以在不使用扩展程序的情况下清除控制台或控制台中的输出?

是的,使用恰当命名的console.clear函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM