The length of the string. The length property is read-only.
Property of
String
Description
For a null string, length is 0.
Example
The following example displays 8 in an Alert dialog box:
var x="Netscape" Alert("The string length is " + x.length)