SectionΒ 3. ChapterΒ 20
single
Strings 2/5
Swipe to show menu
String length:
We use the length property to check the length of the string.
1console.log(`JavaScript`.length );
Task
Swipe to start coding
The task is to create a string variable named running and assign the value The horse runs so fast to it. Now check the length or number of characters in the above variable.
Solution
Note: length property also considers the spaces between the string length.
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 20
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat