Skip to main content
Console.clear - node__console.d.ts - Node documentation
method Console.clear

Usage in Deno

```typescript import { type Console } from "node:node__console.d.ts"; ```
Console.clear(): void
When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY. When `stdout` is not a TTY, this method does nothing. The specific operation of `console.clear()` can vary across operating systems and terminal types. For most Linux operating systems, `console.clear()` operates similarly to the `clear` shell command. On Windows, `console.clear()` will clear only the output in the current terminal viewport for the Node.js binary.

Return Type

void