HTML DOM console.clear()Method
Definition and Usage
The console.clear() method is used to clear all information in the console.
After successful execution, the console.clear() method will output "Console was cleared" to the console.
Syntax
console.clear()
Browser Support
The numbers in the table indicate the first browser version that supports the method.
| Method | |||||
|---|---|---|---|---|---|
| console.clear() | Yes | Yes | 48 | Yes | Yes |
Console Object