Skip to content

Commit 8752573

Browse files
committed
minor fixes
1 parent 8db6519 commit 8752573

File tree

1 file changed

+2
-2
lines changed
  • 1-js/05-data-types/09-keys-values-entries

1 file changed

+2
-2
lines changed

1-js/05-data-types/09-keys-values-entries/article.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Objects lack many methods that exist for arrays, e.g. `map`, `filter` and others
7777
If we'd like to apply them, then we can use `Object.entries` followed by `Object.fromEntries`:
7878

7979
1. Use `Object.entries(obj)` to get an array of key/value pairs from `obj`.
80-
2. Use array methods on that array, e.g. `map`, to transform key/value pairs.
80+
2. Use array methods on that array, e.g. `map`, to transform these key/value pairs.
8181
3. Use `Object.fromEntries(array)` on the resulting array to turn it back into an object.
8282

8383
For example, we have an object with prices, and would like to double them:
@@ -98,6 +98,6 @@ let doublePrices = Object.fromEntries(
9898
*/!*
9999

100100
alert(doublePrices.meat); // 8
101-
```
101+
```
102102

103103
It may look difficult at first sight, but becomes easy to understand after you use it once or twice. We can make powerful chains of transforms this way.

0 commit comments

Comments
 (0)