To map a Map object, you must first transfer it to an array of arrays. It seems to me the opposite.
Can someone explain to me that this is justified by the design? I understand that in other languages, such as Scala, there are map methods for Maps, so I'm trying to understand why they are not available in Javascript.
This syntax seems unnecessarily complex and verbose:
let mappedMap = new Map( [...originalMap] .map(([k, v]) => [k * 2, '_' + v]) );
Could it be something like this?
let mappedMap = originalMap.map((k, v) => [k * 2, '_' + v]);
source share