From 5a3d22e76be2c447c32d4ed57b4080af6fcfe609 Mon Sep 17 00:00:00 2001 From: Rebekah Koon <55937662+RebekahKoon@users.noreply.github.com> Date: Sat, 29 May 2021 09:03:21 -0700 Subject: [PATCH] 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 --- .../basic-javascript/find-the-length-of-a-string.md | 2 +- ...acket-notation-to-find-the-last-character-in-a-string.md | 6 +++--- ...otation-to-find-the-nth-to-last-character-in-a-string.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/find-the-length-of-a-string.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/find-the-length-of-a-string.md index 3270c6dbc9..00b57be875 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/find-the-length-of-a-string.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/find-the-length-of-a-string.md @@ -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-- diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.md index a4ccbbc7b5..92b8f64187 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.md @@ -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-- diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.md index 23bcd6f659..912b0b3b6b 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.md @@ -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--