HTML DOM console.clear() Method
- Previous Page assert()
- Next Page count()
- Go to the Previous Level Window Console Object
Definition and Usage
The console.clear() method clears the console.
The console.clear() method will also write a message in the console: "Console cleared".
Syntax
console.clear()
Browser Support
The numbers in the table indicate the first browser version that fully supports this method.
Method | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
console.clear() | Support | Support | 48 | Support | Support |
- Previous Page assert()
- Next Page count()
- Go to the Previous Level Window Console Object