Skip to main content
Version: 3.14.1

Map.prototype.keys()

The keys() method returns a new iterator object that contains the keys for each element in the Map object in insertion order. In this particular case, this iterator object is also an iterable, so a for...of loop can be used.

Syntax

keys()

Return value

A new Map iterator object.