G
G
gylah-u2022-01-28 16:42:25
Node.js
gylah-u, 2022-01-28 16:42:25

How to print mutable text in Node JS terminal?

Imagine there is an array with words, how to display them so that not every word in a new line, but all in one line, and the previous word is replaced by a new one.
For example
Hello
World
Instead of

Hello
World

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2022-01-28
@vabka

Use ansi escape code - by typing a special character sequence you can clear the console or move the caret

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question