Get the number of characters in the text string.
let text = "";
text.length;
- a number that is the length (number of characters) in the text string.
Add some text to a string until it is at least 100 characters long.
let tooShort = "";
while (tooShort.length < 100)
{
tooShort = tooShort + "add some more...";
}