I am working with a Map
structured as follows:
const m = new Map();
m.set('key1', {})
.
m.set('keyN' {})
The Map
may contain one or multiple items. I am wondering if there is a way to retrieve the first item by index, without using m.get('key1')
and avoiding an iterator loop?
For instance, can I do something like: m.get()[0]