File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131- [ Linear & Binary Search] ( https://github.com/Vishal-raj-1/DSA-In-JS-With-Vishal/blob/main/Searching%20Algorthims/README.md )
3232- [ Objects] ( https://github.com/Vishal-raj-1/DSA-In-JS-With-Vishal/blob/main/Objects/README.md )
3333- [ Sorting] ( https://github.com/Vishal-raj-1/DSA-In-JS-With-Vishal/blob/main/Sorting/README.md )
34+ - [ Set & Map] ( https://github.com/Vishal-raj-1/DSA-In-JS-With-Vishal/tree/main/Set%20%26%20Map )
3435
3536## Upcoming Topics
3637
Original file line number Diff line number Diff line change 11# Map, WeakMap, Set, WeakSet in JavaScript
22
3+ <p align =" center " >
4+ <a href =" https://youtube.com/live/oxpVW_HSqvM " >
5+ <img src =" https://img.youtube.com/vi/oxpVW_HSqvM/0.jpg " alt =" Set & Map In JavaScript " />
6+ </a >
7+ </p >
8+
39## Set in JavaScript:
410
511``` javascript
@@ -36,11 +42,11 @@ mySet.clear();
3642const myMap = new Map ();
3743
3844// Adding key-value pairs to the Map
39- myMap .set (" name" , " John " );
40- myMap .set (" age" , 30 );
45+ myMap .set (" name" , " Vishal " );
46+ myMap .set (" age" , 21 );
4147
4248// Getting a value using a key
43- console .log (myMap .get (" name" )); // John
49+ console .log (myMap .get (" name" )); // Vishal
4450
4551// Checking if a key exists
4652console .log (myMap .has (" age" )); // true
You can’t perform that action at this time.
0 commit comments