Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
24 lines (17 loc) · 398 Bytes

File metadata and controls

24 lines (17 loc) · 398 Bytes
Copy raw file
Download raw file
Outline
Edit and raw actions

length

Get the number of characters in the text string.

let text = "";
text.length;

Returns

  • a 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.

let tooShort = "";
while (tooShort.length < 100)
{
    tooShort = tooShort + "add some more...";
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.