The keys() method of the Map object returns an iterator object that contains all of the keys of the key/value pairs in insertion order.
const officers = new Map([
['president', 'Jeff'],
['secretary', 'Adam'],
['treasurer', 'Anne']
]);
// iterator object
const officersKeys = officers.keys();
for (const key of officersKeys) {
console.log(key);
}
// "president"
// "secretary"
// "treasurer"