The entries()
method of Set
instances returns a new set iterator object that contains [value, value]
for each element in this set, 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.