Basic JavaScript (30/111) | Find the Length of a String | freeCodeCamp

preview_player
Показать описание
Basic JavaScript (30/111) | Find the Length of a String | freeCodeCamp

You can find the length of a String value by writing .length after the string variable or string literal.

"Alan Peter".length; // 10

Use the .length property to count the number of characters in the lastName variable and assign it to lastNameLength.

Рекомендации по теме