mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): clarify where to write code in string formatter workshop (#66435)
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ learningIsFun
|
||||
|
||||
The second word in the `lowercaseWord` variable is `"case"`. To access the `c` in that word, you can use `lowercaseWord[5]`.
|
||||
|
||||
Use the `+` operator to concatenate `lowercaseWord.slice(0, 5)` with the result of using the correct method for converting strings to uppercase on `lowercaseWord[5]`.
|
||||
Update the `camelCasedVersion` assignment to use the `+` operator to concatenate `lowercaseWord.slice(0, 5)` with the result of using the correct method for converting strings to uppercase on `lowercaseWord[5]`.
|
||||
|
||||
Now you should see `camelC` in the console.
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ const str = "abcd";
|
||||
str.slice(-2); // cd
|
||||
```
|
||||
|
||||
Use the `+` operator to concatenate `lowercaseWord.slice(0, 5) + lowercaseWord[5].toUpperCase()` with the result of using the `slice()` method on `lowercaseWord`. Pass in the number `-3` for the `slice()` method.
|
||||
Update the `camelCasedVersion` assignment to also concatenate `lowercaseWord.slice(0, 5) + lowercaseWord[5].toUpperCase()` with the result of using the `slice()` method on `lowercaseWord`. Pass in the number `-3` for the `slice()` method.
|
||||
|
||||
And with that last change, your workshop is complete!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user