console.clear()
The console.clear()
method clears the console if the
environment allows it.
Syntax
console.clear();
Specifications
Specification | Status | Comment |
---|---|---|
Console API The definition of 'console.clear()' in that specification. |
Living Standard | Initial definition |
Browser compatibility
BCD tables only load in the browser