Skip to content

Commit aacdf01

Browse files
authored
Merge pull request #2192 from vsemozhetbyt/patch-3
Symmetrize Map and Set summaries
2 parents dd02130 + 7faa49e commit aacdf01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@ The same methods `Map` has for iterators are also supported:
304304
Methods and properties:
305305
306306
- `new Map([iterable])` -- creates the map, with optional `iterable` (e.g. array) of `[key,value]` pairs for initialization.
307-
- `map.set(key, value)` -- stores the value by the key.
307+
- `map.set(key, value)` -- stores the value by the key, returns the map itself.
308308
- `map.get(key)` -- returns the value by the key, `undefined` if `key` doesn't exist in map.
309309
- `map.has(key)` -- returns `true` if the `key` exists, `false` otherwise.
310-
- `map.delete(key)` -- removes the value by the key.
310+
- `map.delete(key)` -- removes the value by the key, returns `true` if `key` existed at the moment of the call, otherwise `false`.
311311
- `map.clear()` -- removes everything from the map.
312312
- `map.size` -- returns the current element count.
313313

0 commit comments

Comments
 (0)