Return to Kroll Design home page

JavaScript Tutorials

« Return

length property (strings)

To determine the length of a string, that is, to determine how many characters the string currently contains, look at the "length" property of the string.


<script type="text/javascript">
my_string = "A Historic Inauguration";
document.write("The length of \"", my_string, "\" is : ", my_string.length);


« Return

©2012 Kroll Design    781.910.3694
Last modified: 12/31/1969 7:00 PM