When ever I use console.clear() it says in console, "Console was cleared. Is there a way to clear the console without this outputting?
Asked
Active
Viewed 918 times
5

Jak
- 162
- 2
- 11
-
2not according to mdn... – Daniel A. White Oct 14 '18 at 02:49
2 Answers
0
It's not ideal but you could print a bunch of blank lines like so:
console.clear();
console.log(Array(100).join("\n"));

Rocky Sims
- 3,523
- 1
- 14
- 19
0
If you just want to clear the console messages, why not try the CtrlL shortcut, it works well.
-
I have same question because the console is a part of my app. Console for customers to debug, not developer. – LE SANG Jan 05 '20 at 14:43
-
en, I think there must exist some way to clear message in the console, maybe it is invoking some api, but not by hitting the Ctrl + L, you need do some further search – Gyumeijie Feb 01 '20 at 08:11