JavaScript String Object
The length property returns the length of a string (in characters).
![]()
The length property is supported in all major browsers.
Return the number of characters in a string:
The output of the code above will be:
JavaScript String Object
Your message has been sent to W3Schools.