# String length in JavaScript

The number of characters in a string is contained in the property `length`:

`let str = 'abcde'; alert(str.length); // shows 5`

The `length` property can be applied directly to a string:

`alert('abcde'.length); // shows 5`

Space is also a character:

`alert('ab de'.length); // shows 5`

Write a string to a variable. Print the length of your string to the screen.

← →
↑
en ru