From 8752573cf3f0efac22af137d1dd3e167d847258f Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Sun, 27 Jun 2021 15:24:42 +0300 Subject: [PATCH] minor fixes --- 1-js/05-data-types/09-keys-values-entries/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/05-data-types/09-keys-values-entries/article.md b/1-js/05-data-types/09-keys-values-entries/article.md index 76b43d9a..0a39d3af 100644 --- a/1-js/05-data-types/09-keys-values-entries/article.md +++ b/1-js/05-data-types/09-keys-values-entries/article.md @@ -77,7 +77,7 @@ Objects lack many methods that exist for arrays, e.g. `map`, `filter` and others If we'd like to apply them, then we can use `Object.entries` followed by `Object.fromEntries`: 1. Use `Object.entries(obj)` to get an array of key/value pairs from `obj`. -2. Use array methods on that array, e.g. `map`, to transform key/value pairs. +2. Use array methods on that array, e.g. `map`, to transform these key/value pairs. 3. Use `Object.fromEntries(array)` on the resulting array to turn it back into an object. For example, we have an object with prices, and would like to double them: @@ -98,6 +98,6 @@ let doublePrices = Object.fromEntries( */!* alert(doublePrices.meat); // 8 -``` +``` 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.