---
title: isEmpty
framework: swift
role: symbol
role_heading: Instance Property
path: swift/dictionary/isempty
---

# isEmpty

A Boolean value that indicates whether the dictionary is empty.

## Declaration

```swift
var isEmpty: Bool { get }
```

## Discussion

Discussion Dictionaries are empty when created with an initializer or an empty dictionary literal. var frequencies: [String: Int] = [:] print(frequencies.isEmpty) // Prints "true"

## See Also

### Inspecting a Dictionary

- [count](swift/dictionary/count.md)
- [capacity](swift/dictionary/capacity.md)
