HTML DOM console.clear() Method
Definition and Usage
The console.clear() method clears the console.
The console.clear() method will also write a message in the console: "Console was cleared".
Browser Support
The numbers in the table specify the first browser version that fully supports the method.
Method | |||||
---|---|---|---|---|---|
console.clear() | Yes | Yes | 48 | Yes | Yes |
Syntax
console.clear()