---
schema_version: "1"
id: df23189ecf216f85da9c2168e6c59203e6c22676edf54ffd1e02be79ecaa7b5f
title: warning()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/ref-jsapi/ref-jsapi-dollara-warning.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-dollara-warning.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c997afd7daa8110cd8ecd54413cbde8257f3d202590db8b721ca89d3af992188
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# warning()

Deprecated. Logs a warning to the browser's JavaScript console, if it is available.

## Signature

`warning (String w, Error e)`

## Parameters

**_w_:** Type: `String`. The message to log.

**_error_:** Type: `Object`. The error message to log in the stack trace.

## Returns

**Type: `String`** The requested value.

