How to Get a Specific Value from a Map in JavaScript
In this lesson, we will see how to get a specific value from a map in JavaScript, sometimes we want to get the value from a map in JavaScript so how can we do that?
The get() method
To do that we can use the get() method that takes the key of the value as an argument and returns the value associated with the specified key.
const myMap = new Map([['name','john'],['age',22],['city','london']);
console.log(myMap.get('name'));
//john