pxt-core
Version:
Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors
24 lines (17 loc) • 398 B
Markdown
Get the number of characters in the text string.
```block
let text = "";
text.length;
```
* a [number](/types/number) that is the length (number of characters) in the text string.
## Example
Add some text to a string until it is at least 100 characters long.
```blocks
let tooShort = "";
while (tooShort.length < 100)
{
tooShort = tooShort + "add some more...";
}
```