---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# Set.prototype.keys()

The **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.

## Syntax

```js
keys()
```

### Return value

A new iterator object containing the values for each element in the given
`Set`, in insertion order.
