---
title: DeviceOrientationEvent.beta
slug: Web/API/DeviceOrientationEvent/beta
tags:
  - API
  - Device Orientation API
  - DeviceOrientationEvent
  - NeedsBetterSpecLink
  - NeedsExample
  - NeedsMarkupWork
  - Property
  - Reference
browser-compat: api.DeviceOrientationEvent.beta
---
{{ ApiRef("Device Orientation Events") }}

Returns the rotation of the device around the X axis; that is, the number of degrees,
ranged between -180 and 180,  by which the device is tipped forward or backward. See [Orientation and motion data
explained](/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained "Orientation and motion data explained") for details.

## Syntax

```js
var beta = instanceOfDeviceOrientationEvent.beta;
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{ domxref("DeviceOrientationEvent") }}
- [Detecting device orientation](/en-US/docs/Web/API/Detecting_device_orientation "Detecting device orientation")
- [Orientation and motion data
  explained](/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained "Orientation and motion data explained")
- {{ domxref("window.ondeviceorientation") }}
- {{ event("deviceorientation") }}
