Tutorials » Javascript tutorials »

The JavaScript String object

This article explains about String object into depth.

String Object:

String is nothing but a piece of text. The purpose of string object is to work over text. This is most commonly used object. String object has only one property called length . This returns length of the string.


string.length where string is the variable of type string.




<title>JavaScript Tutorials</title>



The lengh of the string is :

<script language ="JavaScript">

var v="Dotnet Spider";






The above example shows output in browser as The lengh of the string is : 13

var v="Dotnet Spider"; creates a string called V and stores the specified text as Dotnet Spider.
The length of the string is computed using length property .As the string length is 13 it's displayed on browser.

Next Chapter: The string Object
Previous Chapter: JavaScript Objects
More Chapters: Javascript Tutorials
More Tutorials: Tutorial Index

Top Contributors
    Last 7 Daysmore...

    Awards & Gifts

    Online Members

    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India