fix(learn): clarify how object names are associated with destructured fields (#39485)

* Clarify how object names are associated with destructured fields

* fix: make description more concise

* Update curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-pass-an-object-as-a-functions-parameters.english.md

Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
Co-authored-by: Manish Giri <manish.giri.me@gmail.com>
This commit is contained in:
bhagerty
2020-09-02 13:06:27 -05:00
committed by GitHub
parent db15a44160
commit 046137891e

View File

@ -26,8 +26,7 @@ const profileUpdate = ({ name, age, nationality, location }) => {
}
```
This removes some extra lines and makes our code look neat.
This has the added benefit of not having to manipulate an entire object in a function — only the fields that are needed are copied inside the function.
When <code>profileData</code> is passed to the above function, the values are destructured from the function parameter for use within the function.
</section>
## Instructions