JavaScript Console clear()
JavaScript Console clear()
The clear() method is used for clearing the console. When everything is cleared then it will write a message "Console was cleared" in the console.
Syntax:-
Its syntax is:- console.clear()