pull/53/head
Asabeneh 5 years ago
parent c9111011f1
commit ed48496e6f

@ -202,7 +202,7 @@ console.log(counts)
``` ```
```js ```js
;[ [
{ lang: 'English', count: 3 }, { lang: 'English', count: 3 },
{ lang: 'Finnish', count: 1 }, { lang: 'Finnish', count: 1 },
{ lang: 'French', count: 2 }, { lang: 'French', count: 2 },
@ -342,15 +342,21 @@ Map(3) {"Finland" => "Helsinki", "Sweden" => "Stockholm", "Norway" => "Oslo"}
console.log(countriesMap.get('Finland')) console.log(countriesMap.get('Finland'))
``` ```
````sh ```sh
Helsinki Helsinki
``` ```
### Checking key in Map ### Checking key in Map
Check if a key exist in a map using *has* method. It returns *true* or *false*.
```js ```js
console.log(countriesMap.has('Finland')) console.log(countriesMap.has('Finland'))
```` ```
```sh
true
```
Getting all values from map using loop Getting all values from map using loop

Loading…
Cancel
Save