> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# console: warn() method

APISummary
`warn` outputs a warning message to the console at the "warning" log level.

## Syntax

```ts
warn(val1, val2, ...): undefined;
```

### Parameters

#### val1, val2, ...

A list of JavaScript values to output.

### return value

None(`undefined`).

## Compatibility

**Compatibility Table**

**Query:** `lynx-api.global.console.warn`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-api/global/console/warn.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| warn | Yes (1.3) | Yes (3.4) | Yes (1.3) | Yes (3.5) | Yes (3.5) | Yes |

**`warn`**

output a warn level message

