---
title: "subscript(_:)"
framework: playgroundsupport
role: symbol
role_heading: Subscript
path: playgroundsupport/playgroundkeyvaluestore/3029534-subscript
---

# subscript(_:)

Reads or stores the value associated with the given key in the key-value store.

## Declaration

```swift
subscript(key: String) -> PlaygroundValue? { get set }
```

## Parameters

- `key`: The key to find in the key-value store.

## Return Value

Return Value The value associated with the key parameter.

## See Also

### Persisting Data

- [current](playgroundsupport/playgroundkeyvaluestore/3029533-current.md)
