Skip to content

Commit

Permalink
Adjust the phrasing of console.clear behavior, correct Node.js behavi…
Browse files Browse the repository at this point in the history
…or (#36828)
  • Loading branch information
circl-lastname authored Nov 17, 2024
1 parent 0c6c5e4 commit c023817
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion files/en-us/web/api/console/clear_static/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ browser-compat: api.console.clear_static

{{APIRef("Console API")}}

The **`console.clear()`** static method clears the console if the console allows it. A graphical console, like those running on browsers, will allow it; a console displaying on the terminal, like the one running on Node, will not support it, and will have no effect (and no error).
The **`console.clear()`** static method clears the console if possible.

A graphical console, like those in web browsers, will remove all previous messages; a console displaying on a terminal, like the one in Node.js, will attempt to clear it using an escape code or system API; otherwise the method will have no effect (and no error).

## Syntax

Expand Down

0 comments on commit c023817

Please sign in to comment.