Merge pull request #1908 from kiniggit/map_set_grammar
grammar fix: a plain object
This commit is contained in:
commit
873e5f77d9
1 changed files with 1 additions and 1 deletions
|
@ -198,7 +198,7 @@ let prices = Object.fromEntries([
|
||||||
alert(prices.orange); // 2
|
alert(prices.orange); // 2
|
||||||
```
|
```
|
||||||
|
|
||||||
We can use `Object.fromEntries` to get an plain object from `Map`.
|
We can use `Object.fromEntries` to get a plain object from `Map`.
|
||||||
|
|
||||||
E.g. we store the data in a `Map`, but we need to pass it to a 3rd-party code that expects a plain object.
|
E.g. we store the data in a `Map`, but we need to pass it to a 3rd-party code that expects a plain object.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue