This repository was archived by the owner on Nov 27, 2023. It is now read-only.
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
Output an Object vs a Map #12
Closed
Description
With a Map, grouping don't have to be on key compatible types and avoids coercions:
o = {};
o[1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000] = 1;
Object.keys(o); // ["1e+90"]
Using an object knowledge of key coercion might be a bit odd.
Problems with Map are usability on reading data out of the Map not being simple property access though but you can always Object.fromEntries(map)
.
Metadata
Metadata
Assignees
Labels
No labels