Javascript Programming 
Fundamental Data Types

STRING

The string object is designed to carry any collection of characters. The syntax for creating a string is:

    var myString = new String("stringContents");

where stringContents is any collection of characters. Notice the use of quotes. You can use a single quote (') or a double quote (") to enclose the characters within your string. You can also create a string using this syntax:

    var myString = "stringContents";

The following are all valid Strings: "Hello World!", "854736", ""

Javascript has some very special String-modification tools built in. Here are some examples of these tools:

[FrontPage Save Results Component]
'Hello World'.length

This function returns the length of the String. In this case, the length is 11.
'Hello World'.substring(0, 5) This function returns a "sub string" of the original string. The starting point is 0, the end point is 5. In this case the resulting string would be, "Hello"
'Hello World'.toLowerCase() This function returns a copy of the original string, but with all the characters converted to lower case.
'Hello World'.toUpperCase() This function returns a copy of the original string, but with all the characters converted to lower case.
NOTE: the use of the (.) dot operator. It separates the String Object from the function acting on the string.