Skip to content

Translate Destructuring assignment in french language #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ importance: 5

---

# Destructuring assignment
# L'affectation par décomposition

We have an object:
Nous avons un objet :

```js
let user = {
Expand All @@ -13,18 +13,18 @@ let user = {
};
```

Write the destructuring assignment that reads:
Écrivez l'affectation par décomposition qui se lit comme suit :

- `name` property into the variable `name`.
- `years` property into the variable `age`.
- `isAdmin` property into the variable `isAdmin` (false if absent)
- Propriété `name` dans la variable `name`.
- Propriété `years` dans la variable `age`.
- Proprété `isAdmin` dans la variable `isAdmin` (false si absent)

The values after the assignment should be:
Les valeurs après l'affectation doivent être :

```js
let user = { name: "John", years: 30 };

// your code to the left side:
// votre code à gauche ::
// ... = user

alert( name ); // John
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ importance: 5

---

# The maximal salary
# Le salaire maximal

There is a `salaries` object:
Il y a un objet `salaries` :

```js
let salaries = {
Expand All @@ -14,9 +14,9 @@ let salaries = {
};
```

Create the function `topSalary(salaries)` that returns the name of the top-paid person.
Créer la fonction `topSalary(salaries)` qui renvoie le nom de la personne la mieux payée.

- If `salaries` is empty, it should return `null`.
- If there are multiple top-paid persons, return any of them.
- Si `salaries` est vide, devrait retourner `null`.
- S'il y a plusieurs personnes les mieux payées, renvoyez-en une.

P.S. Use `Object.entries` and destructuring to iterate over key/value pairs.
P.S. Utilisez `Object.entries` et la décomposition pour parcourir les paires clé / valeur.
Loading