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.
This commit is contained in:
JuumanBeing
2022-04-09 06:27:50 -04:00
committed by GitHub
parent a963286612
commit c92a71e11e

View File

@ -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.