Skip to content

Commit 515dc44

Browse files
authored
👾 smth
1 parent 429caba commit 515dc44

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

‎1-js/05-data-types/07-map-set/article.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ But that's not enough for real life. That's why `Map` and `Set` also exist.
1414

1515
Methods and properties are:
1616

17-
- [`new Map()`](mdn:js/Map/Map) -- creates the map.
18-
- [`map.set(key, value)`](mdn:js/Map/set) -- stores the value by the key.
19-
- [`map.get(key)`](mdn:js/Map/get) -- returns the value by the key, `undefined` if `key` doesn't exist in map.
20-
- [`map.has(key)`](mdn:js/Map/has) -- returns `true` if the `key` exists, `false` otherwise.
21-
- [`map.delete(key)`](mdn:js/Map/delete) -- removes the value by the key.
22-
- [`map.clear()`](mdn:js/Map/clear) -- removes everything from the map.
23-
- [`map.size`](mdn:js/Map/size) -- returns the current element count.
17+
- [`new Map()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/Map) -- creates the map.
18+
- [`map.set(key, value)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set) -- stores the value by the key.
19+
- [`map.get(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get) -- returns the value by the key, `undefined` if `key` doesn't exist in map.
20+
- [`map.has(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has) -- returns `true` if the `key` exists, `false` otherwise.
21+
- [`map.delete(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete) -- removes the value by the key.
22+
- [`map.clear()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear) -- removes everything from the map.
23+
- [`map.size`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/size) -- returns the current element count.
2424

2525
For instance:
2626

@@ -104,9 +104,9 @@ map.set('1', 'str1')
104104
105105
For looping over a `map`, there are 3 methods:
106106
107-
- [`map.keys()`](mdn:js/Map/keys) -- returns an iterable for keys,
108-
- [`map.values()`](mdn:js/Map/values) -- returns an iterable for values,
109-
- [`map.entries()`](mdn:js/Map/entries) -- returns an iterable for entries `[key, value]`, it's used by default in `for..of`.
107+
- [`map.keys()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/keys) -- returns an iterable for keys,
108+
- [`map.values()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/values) -- returns an iterable for values,
109+
- [`map.entries()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/entries) -- returns an iterable for entries `[key, value]`, it's used by default in `for..of`.
110110
111111
For instance:
112112
@@ -232,7 +232,7 @@ That's the same, because `Object.fromEntries` expects an iterable object as the
232232
233233
## Set
234234
235-
A [`Set`](mdn:js/Set) is a special type collection - "set of values" (without keys), where each value may occur only once.
235+
A [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) is a special type collection - "set of values" (without keys), where each value may occur only once.
236236
237237
Its main methods are:
238238

0 commit comments

Comments
 (0)