So when you console.log
you're appending lines to stdout. I understand that much, but how do programs like top print to the console a continually refreshed view of data and then wipe that data when you kill it?
You can see when I kill top its data is no longer displayed. I can't scroll in my terminal window or anything to see it either, like most other scripts and programs I use.
How can I do this in node? I want to display some data and continually refresh it in place until the script is killed.