Skip to content

Commit ed48496

Browse files
committed
day 10
1 parent c911101 commit ed48496

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

10_Day/10_day_Set_and_Map.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ console.log(counts)
202202
```
203203

204204
```js
205-
;[
205+
[
206206
{ lang: 'English', count: 3 },
207207
{ lang: 'Finnish', count: 1 },
208208
{ lang: 'French', count: 2 },
@@ -342,15 +342,21 @@ Map(3) {"Finland" => "Helsinki", "Sweden" => "Stockholm", "Norway" => "Oslo"}
342342
console.log(countriesMap.get('Finland'))
343343
```
344344

345-
````sh
345+
```sh
346346
Helsinki
347347
```
348348

349349
### Checking key in Map
350350

351+
Check if a key exist in a map using *has* method. It returns *true* or *false*.
352+
351353
```js
352354
console.log(countriesMap.has('Finland'))
353-
````
355+
```
356+
357+
```sh
358+
true
359+
```
354360

355361
Getting all values from map using loop
356362

0 commit comments

Comments
 (0)