Skip to content

Commit c066fea

Browse files
authored
Merge pull request #2191 from vsemozhetbyt/patch-2
Clarify a bit ambiguous wording in 1.5.7
2 parents 501adfd + 104bee3 commit c066fea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ alert( map.size ); // 3
4242
As we can see, unlike objects, keys are not converted to strings. Any type of key is possible.
4343

4444
```smart header="`map[key]` isn't the right way to use a `Map`"
45-
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).
45+
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).
4646

4747
So we should use `map` methods: `set`, `get` and so on.
4848
```

0 commit comments

Comments
 (0)