erase previous line nodejs code example
Example: delete previous line node
for (let i = 0; i < 100; i++) {
process.stdout.write(`\rProgress: ${i + 1}/100`);
}
console.log(); // final new line
for (let i = 0; i < 100; i++) {
process.stdout.write(`\rProgress: ${i + 1}/100`);
}
console.log(); // final new line