Skip to content

Commit d021ad6

Browse files
authored
Merge pull request #288 from petersonjean/master
Adds french translation for object-keys exercise #267
2 parents 6708880 + e5a6898 commit d021ad6

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

i18n/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
, "LOOPING THROUGH ARRAYS": "ITÉRER SUR UN TABLEAU"
1717
, "OBJECTS": "OBJETS"
1818
, "OBJECT PROPERTIES": "PROPRIÉTÉS D'OBJETS"
19+
, "OBJECT KEYS": "CLÉS D'OBJETS"
1920
, "FUNCTIONS": "FONCTIONS"
2021
, "FUNCTION ARGUMENTS": "ARGUMENTS DE FONCTIONS"
2122
, "SCOPE": "SCOPE"

problems/object-keys/problem_fr.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
JavaScript provides a native way of listing all the available keys of an object. This can be helpful for looping through all the properties of an object and manipulating their values accordingly.
1+
JavaScript fournit un moyen natif de lister toutes les clés disponibles d'un objet. Ceci peut être utile pour parcourir en boucle toutes les propriétés d'un objet et manipuler leurs valeurs en conséquence.
22

3-
Here's an example of listing all object keys using the **Object.keys()**
4-
prototype method.
3+
Voici un exemple de liste de toutes les clés d'objets utilisant la méthode prototype **Object.keys()**.
54

65
```js
76
const car = {
@@ -14,13 +13,13 @@ const keys = Object.keys(car)
1413
console.log(keys)
1514
```
1615

17-
The above code will print an array of strings, where each string is a key in the car object. `['make', 'model', 'year']`
16+
Le code ci-dessus imprimera un tableau de _strings_, où chaque _string_ est une _clé_ (_key_) dans l'objet `car`. `['make', 'model', 'year']`
1817

1918
## The challenge:
2019

21-
Create a file named `object-keys.js`.
20+
Créez un fichier nommé `object-keys.js`.
2221

23-
In that file, define a variable named `car` like this:
22+
Dans ce fichier, définissez une variable nommée `car` comme ceci:
2423

2524
```js
2625
const car = {
@@ -30,14 +29,14 @@ const car = {
3029
}
3130
```
3231

33-
Then define another variable named `keys` like this:
32+
Définissez ensuite une autre variable nommée `keys` comme ceci:
3433
```js
3534
const keys = Object.keys(car)
3635
```
3736

38-
Use `console.log()` to print the `keys` variable to the terminal.
37+
Utilisez `console.log()` pour imprimer la variable `keys` sur le terminal.
3938

40-
Check to see if your program is correct by running this command:
39+
Vérifiez si votre programme est correct en exécutant cette commande:
4140

4241
```bash
4342
javascripting verify object-keys.js

problems/object-keys/solution_fr.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
# CORRECT.
44

5-
Good job using the Object.keys() prototype method. Remember to use it when you need to list the keys of an object.
5+
Bon travail avec la méthode du prototype Object.keys(). N'oubliez pas de l'utiliser lorsque vous devez lister les clés d'un objet.
66

7-
The next challenge is all about **functions**.
7+
Le prochain défi portera sur les **functions**.
88

9-
Run `javascripting` in the console to choose the next challenge.
9+
Exécutez `javascripting` dans la console pour choisir le prochain défi.
1010

1111
---

0 commit comments

Comments
 (0)