Properties are the values associated with an object.
In the following example we are using the length property of the String object to return the number of characters in a string:



<script type="text/javascript">
var txt="Hello World!";
document.write(txt.length);
</script>


The output of the code above will be:
12


This entry was posted on 6:32 AM and is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

0 comments: