---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# Array.prototype.entries

The **`entries()`** method returns a new **Array
Iterator** object that contains the key/value pairs for each index in the
array.

## Syntax

```js
entries()
```

### Return value

A new `Array` iterator object.

## Description

When used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.

The `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.
