Console clear()
Definition and Usage
The clear()
method clears the console.
The clear()
method also write "Console was cleared" in the console.
Syntax
console.clear()
Browser Support
console.clear()
is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |