Sorting Javascript map by decimal keys
I have a map with keys = day of the month, 1... 31. If I understand correctly, Javascript converts the map keys into strings anyways. After sorting using the standard new Map([...myMap.entries()].sort()) the map becomes sorted by the keys as:…