HTML DOM console.clear() methode

Definitie en gebruik

De methode console.clear() leegt de console.

De methode console.clear() schrijft ook een bericht in de console: 'De console is geleegd'.

Voorbeeld

Verwijder alle berichten uit de console:

console.clear();

Try it yourself

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