---
title: key
framework: tvmljs
role: symbol
role_heading: Instance Method
path: tvmljs/storage/1627380-key
---

# key

Returns the key located in the specified location.

## Declaration

```data
String key(
    in int index
);
```

```data
DOMString? key(
    unsigned long index
);
```

## Parameters

- `index`: The location of the key to be retrieved.

## Return Value

Return Value The found key.

## Discussion

Discussion If the value in the index parameter is greater than the number of key-value pairs currently in the storage list, this function returns null.

## See Also

### Accessing Key-Value Pair Information

- [clear](tvmljs/storage/1627404-clear.md)
- [getItem](tvmljs/storage/1627333-getitem.md)
- [length](tvmljs/storage/1627448-length.md)
- [removeItem](tvmljs/storage/1627332-removeitem.md)
- [setItem](tvmljs/storage/1627302-setitem.md)
