console: clear()-statische Methode
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Die statische Methode console.clear()
löscht die Konsole, wenn möglich.
Eine grafische Konsole, wie die in Webbrowsern, entfernt alle vorherigen Nachrichten; eine auf einem Terminal angezeigte Konsole, wie die in Node.js, wird versuchen, sie mit einem Escape-Code oder System-API zu löschen; andernfalls hat die Methode keine Wirkung (und es tritt kein Fehler auf).
Syntax
js
console.clear()
Parameter
Keine.
Rückgabewert
Keiner (undefined
).
Spezifikationen
Specification |
---|
Console # clear |
Browser-Kompatibilität
BCD tables only load in the browser