Skip to content

Commit f0beef6

Browse files
committed
Conflicts fixed on "Strings" page and solution in french language
1 parent f31a945 commit f0beef6

File tree

2 files changed

+30
-330
lines changed

2 files changed

+30
-330
lines changed

1-js/05-data-types/03-string/1-ucfirst/solution.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,7 @@ let newStr = str[0].toUpperCase() + str.slice(1);
88

99
Il y a un petit problème cependant. Si `str` est vide, alors `str[0]` est `undefined`, et comme `undefined` n’a pas la méthode `toUpperCase()`, nous aurons une erreur.
1010

11-
<<<<<<< HEAD
12-
Il y a deux variantes ici ;;
13-
14-
1. Utiliser `str.charAt(0)`, comme il retourne toujours une chaîne de caractères (peut-être vide).
15-
2. Ajouter un test pour une chaîne de caractères vide.
16-
17-
Voici la deuxième variante :
18-
=======
19-
The easiest way out is to add a test for an empty string, like this:
20-
>>>>>>> bf7d8bb1af3b416d393af1c15b03cb1352da1f9c
11+
La solution la plus simple consiste à ajouter un test pour une chaîne vide, comme ceci :
2112

2213
```js run demo
2314
function ucFirst(str) {

0 commit comments

Comments
 (0)