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
a
Map#get returns the value of the specified element. It is opposite of an object accessor (object['a']) and is not eligible for a left-hand side assignment.
object['a']
The conclusion is to use always Map#set for setting a new value.