File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 31
31
- [ Linear & Binary Search] ( https://github.com/Vishal-raj-1/DSA-In-JS-With-Vishal/blob/main/Searching%20Algorthims/README.md )
32
32
- [ Objects] ( https://github.com/Vishal-raj-1/DSA-In-JS-With-Vishal/blob/main/Objects/README.md )
33
33
- [ 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 )
34
35
35
36
## Upcoming Topics
36
37
Original file line number Diff line number Diff line change 1
1
# Map, WeakMap, Set, WeakSet in JavaScript
2
2
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
+
3
9
## Set in JavaScript:
4
10
5
11
``` javascript
@@ -36,11 +42,11 @@ mySet.clear();
36
42
const myMap = new Map ();
37
43
38
44
// 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 );
41
47
42
48
// Getting a value using a key
43
- console .log (myMap .get (" name" )); // John
49
+ console .log (myMap .get (" name" )); // Vishal
44
50
45
51
// Checking if a key exists
46
52
console .log (myMap .has (" age" )); // true
You can’t perform that action at this time.
0 commit comments