Strings 2/5
String length:
We use the length property to check the length of the string.
1console.log(`JavaScript`.length );
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.
Merci pour vos commentaires !
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Can you explain how the length property works with different types of strings?
What happens if the string is empty?
Can you show an example with spaces in the string?
Génial!
Completion taux amélioré à 2
Strings 2/5
Glissez pour afficher le menu
String length:
We use the length property to check the length of the string.
1console.log(`JavaScript`.length );
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.
Merci pour vos commentaires !
single