<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/database](./database.md) &gt; [DataSnapshot](./database.datasnapshot.md) &gt; [exists](./database.datasnapshot.exists.md)

## DataSnapshot.exists() method

Returns true if this `DataSnapshot` contains any data. It is slightly more efficient than using `snapshot.val() !== null`<!-- -->.

<b>Signature:</b>

```typescript
exists(): boolean;
```
<b>Returns:</b>

boolean

