I have a map as follows:
let map = new Map();
map.set(\"a\", 1);
//Map is now {\'a\' => 1}
I want to change the value of a
I don't know any cleaner way to do that, nevertheless I think that everything depends from the context of your code.
If you are iterating an array or something else and you want to increase your variable, I suggest to use a local variable to do that and, at the end of the iteration, set the value in the map.
var i = map.get('a')
values.forEach( el => {
i += el.someField
})
map.set('a', i)