From c92a71e11e99bce42eae8fc2fe8d9ba8f32a722e Mon Sep 17 00:00:00 2001 From: JuumanBeing <22304451+JuumanBeing@users.noreply.github.com> Date: Sat, 9 Apr 2022 06:27:50 -0400 Subject: [PATCH] fix(curriculum): include note about counting spaces by .length property (#45641) Added a sentence to bring attention to the fact that the JS string .length property counts space characters. --- .../basic-javascript/find-the-length-of-a-string.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 bb06cc1dff..e1ca35698b 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 @@ -15,7 +15,7 @@ You can find the length of a `String` value by writing `.length` after the strin console.log("Alan Peter".length); ``` -The value `10` would be displayed in the console. +The value `10` would be displayed in the console. Note that the space character between "Alan" and "Peter" is also counted. For example, if we created a variable `const firstName = "Ada"`, we could find out how long the string `Ada` is by using the `firstName.length` property.