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:
@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user