fix(curriculum): changing Charles -> Ada in JavaScript challenge descriptions (#42280)

* changing Charles -> Ada in JavaScript challenge descriptions

* fix: changing Charles -> Ada in JavaScript challenge descriptions

* fix: changing firstName value from Ada to Augusta in javascript lesson
This commit is contained in:
Rebekah Koon
2021-05-29 09:03:21 -07:00
committed by GitHub
parent c966823920
commit 5a3d22e76b
3 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,7 @@ console.log("Alan Peter".length);
The value `10` would be displayed in the console.
For example, if we created a variable `var firstName = "Charles"`, we could find out how long the string `Charles` is by using the `firstName.length` property.
For example, if we created a variable `var firstName = "Ada"`, we could find out how long the string `Ada` is by using the `firstName.length` property.
# --instructions--

View File

@ -11,16 +11,16 @@ dashedName: use-bracket-notation-to-find-the-last-character-in-a-string
In order to get the last letter of a string, you can subtract one from the string's length.
For example, if `var firstName = "Charles"`, you can get the value of the last letter of the string by using `firstName[firstName.length - 1]`.
For example, if `var firstName = "Ada"`, you can get the value of the last letter of the string by using `firstName[firstName.length - 1]`.
Example:
```js
var firstName = "Charles";
var firstName = "Ada";
var lastLetter = firstName[firstName.length - 1];
```
`lastLetter` would have a value of the string `s`.
`lastLetter` would have a value of the string `a`.
# --instructions--

View File

@ -11,16 +11,16 @@ dashedName: use-bracket-notation-to-find-the-nth-to-last-character-in-a-string
You can use the same principle we just used to retrieve the last character in a string to retrieve the Nth-to-last character.
For example, you can get the value of the third-to-last letter of the `var firstName = "Charles"` string by using `firstName[firstName.length - 3]`
For example, you can get the value of the third-to-last letter of the `var firstName = "Augusta"` string by using `firstName[firstName.length - 3]`
Example:
```js
var firstName = "Charles";
var firstName = "Augusta";
var thirdToLastLetter = firstName[firstName.length - 3];
```
`thirdToLastLetter` would have a value of the string `l`.
`thirdToLastLetter` would have a value of the string `s`.
# --instructions--