In Python I could do something like myMap = {key: [value1, value2]} and then access the value2 using myMap[key][1]
myMap = {key: [value1, value2]}
value2
myMap[key][1]
Can I do som
You can use Map:
var myMap = new Map(); myMap.set('key','Value'); var res = myMap.get('key'); console.log(var); // Result is: 'Value'