Minor grammar fixes (#36643)

* Minor grammar fix
This commit is contained in:
Lauren Van Sloun
2019-08-20 09:36:22 -04:00
committed by Oliver Eyton-Williams
parent 38badd6259
commit 4507a6b254
3 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ const profileUpdate = ({ name, age, nationality, location }) => {
``` ```
This removes some extra lines and makes our code look neat. 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. 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.
</section> </section>
## Instructions ## Instructions

View File

@ -7,7 +7,7 @@ localeTitle: Utilice la asignación de destrucción para pasar un objeto como pa
--- ---
## Description ## Description
<section id="description"> En algunos casos, puede destruir el objeto en un argumento de función. Considere el siguiente código: <blockquote> const profileUpdate = (profileData) =&gt; { <br> const {nombre, edad, nacionalidad, ubicación} = profileData; <br> // haz algo con estas variables <br> } </blockquote> Esto destruye efectivamente el objeto enviado a la función. Esto también se puede hacer en el lugar: <blockquote> const profileUpdate = ({nombre, edad, nacionalidad, ubicación}) =&gt; { <br> / * hacer algo con estos campos * / <br> } </blockquote> Esto elimina algunas líneas adicionales y hace que nuestro código se vea limpio. Esto tiene la ventaja adicional de no tener que manipular un objeto completo en una función; solo los campos que son necesarios se copian dentro de la función. </section> <section id="description"> En algunos casos, puede destruir el objeto en un argumento de función. Considere el siguiente código: <blockquote> const profileUpdate = (profileData) =&gt; { <br> const {nombre, edad, nacionalidad, ubicación} = profileData; <br> // haz algo con estas variables <br> } </blockquote> Esto destruye efectivamente el objeto enviado a la función. Esto también se puede hacer en el lugar: <blockquote> const profileUpdate = ({nombre, edad, nacionalidad, ubicación}) =&gt; { <br> / * hacer algo con estos campos * / <br> } </blockquote> Esto elimina algunas líneas adicionales y hace que nuestro código se vea limpio. Esto tiene la ventaja adicional de no tener que manipular un objeto completo en una función solo los campos que son necesarios se copian dentro de la función. </section>
## Instructions ## Instructions
<section id="instructions"> Use la asignación de desestructuración dentro del argumento de la función <code>half</code> para enviar solo <code>max</code> y <code>min</code> dentro de la función. </section> <section id="instructions"> Use la asignación de desestructuración dentro del argumento de la función <code>half</code> para enviar solo <code>max</code> y <code>min</code> dentro de la función. </section>

View File

@ -6,7 +6,7 @@ title: Use Destructuring Assignment to Pass an Object as a Function's Parameters
--- ---
## Problem Explanation ## Problem Explanation
You could pass the entire object, and then pick the specific attributes you want by using the `.` operator. But ES6 offers a more elegant option! You could pass the entire object and then pick the specific attributes you want by using the `.` operator, but ES6 offers a more elegant option!
--- ---
@ -14,7 +14,7 @@ You could pass the entire object, and then pick the specific attributes you want
### Hint 1 ### Hint 1
Get rid of the `stats`, and see if you can destructure it. We need the `max` and `min` of `stats`. Get rid of the `stats` and see if you can destructure it. We need the `max` and `min` of `stats`.