Skip to main content
Version: 3.14.1

Set.prototype.entries()

The entries() method returns a new Iterator object that contains an array of [value, value] for each element in the Set object, in insertion order. For Set objects there is no key like in Map objects. However, to keep the API similar to the Map object, each entry has the same value for its key and value here, so that an array [value, value] is returned.

Syntax

entries()

Return value

A new iterator object that contains an array of [value, value] for each element in the given Set, in insertion order.