I have a Map like this:
Map
const m = new Map(); m.set(\'key1\', {}) . m.set(\'keyN\' {})
the Mapcan have 1 or many i
Also, that is correct for both Set and Map: you can convert anything to Array and then get any element by its index. Something like this:
Set
Array
const m = new Map(); m.set('key1', {}); m.set('key2', {}); console.log(Array.from(m)[0]); // ['key1', {}]