---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---

# console.clear()

The **`console.clear()`** method clears the console if the console allows it.

## Syntax

```js
clear()
```

### Parameters

None.

### Return value

`undefined`.
