File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
1-js/05-data-types/07-map-set Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -304,10 +304,10 @@ The same methods `Map` has for iterators are also supported:
304
304
Methods and properties:
305
305
306
306
- `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 .
308
308
- `map.get(key)` -- returns the value by the key, `undefined` if `key` doesn't exist in map.
309
309
- `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` .
311
311
- `map.clear()` -- removes everything from the map.
312
312
- `map.size` -- returns the current element count.
313
313
You can’t perform that action at this time.
0 commit comments