Merge pull request #2191 from vsemozhetbyt/patch-2
Clarify a bit ambiguous wording in 1.5.7
This commit is contained in:
commit
c066feac6c
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ alert( map.size ); // 3
|
|||
As we can see, unlike objects, keys are not converted to strings. Any type of key is possible.
|
||||
|
||||
```smart header="`map[key]` isn't the right way to use a `Map`"
|
||||
Although `map[key]` also works, e.g. we can set `map[key] = 2`, this is treating `map` as a plain JavaScript object, so it implies all corresponding limitations (no object keys and so on).
|
||||
Although `map[key]` also works, e.g. we can set `map[key] = 2`, this is treating `map` as a plain JavaScript object, so it implies all corresponding limitations (only string/symbol keys and so on).
|
||||
|
||||
So we should use `map` methods: `set`, `get` and so on.
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue