1

I would like the console to be completly cleared whenever I call the console.clear() function

However, is there any way to remove the 'Console was cleared' text once that function has been run? I don't mind it normally, but in this case it would be very helpful if there was a solution.

enter image description here

Joachim
  • 178
  • 1
  • 13

1 Answers1

2

You can always print loads of lines to hide any messages in the console that were there before hand.

console.log("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

Or the short version which is

console.log('\n'.repeat('25'));

It is not the best solution but it does work in your case if you don't want the message to say that the console has been cleared

Kermit
  • 89
  • 5
  • If that's the only way around it, thanks. It works nicely with this technique and the text doesn't jump around as it did before. – Joachim May 26 '22 at 09:36