Lets say I have the following map:
let myMap = new Map().set(\'a\', 1).set(\'b\', 2);
And I want to obtain [\'a\', \'b\'] based on the abov
You can use the spread operator to convert Map.keys() iterator in an Array.
let myMap = new Map().set('a', 1).set('b', 2).set(983, true) let keys = [...myMap.keys()] console.log(keys)