The length property is so simple, it can be hard to understand it at first, especially if you are looking for some deep meaning. It has no deep or even complex meaning. Here is a string:
It has 12 characters (including spaces and punctuation). It's length is 12. Try this:
Code:
<script type="text/javascript">
alert ("I'm a string".length)
</script>
Length can apply to other things besides strings. For the most part it is only used with strings and arrays. Here is an array:
Code:
["I'm", "an", "array"]
It has three items. Its length is three:
Code:
<script type="text/javascript">
alert (["I'm", "an", "array"].length)
</script>
The length property is used in javascript to determine how long things are so other operations can be carried out - say once for each unit of length, or on/for each item that represents a unit of length. It's that simple.
Bookmarks