I've been working on some problems on projecteuler.net, and am programming functions and algorithms to solve these problems in mostly JavaScript (ran in the Node.js environment).
In many of these problems I am going through many thousand different numbers, and I would like to show (in the terminal output) which number it is currently on. I don't want it to just keep writing new lines, but just update the existing line... Is there a way to do this in JavaScript? Possibly with the help of any Node modules?
I know there is a way to clear the console, and so I could just have it clear it and then write the number again, but that would also clear the previous output that I still want to show...
Thanks in advance!
ANSI escape codes