string

A string object, after creation, represents any sequence of zero or more characters which are to be treated strictly as text. That is, they have no executable value. To make a character, sequence of characters (or lack of characters) a string value, enclose them in quotes, as shown below:

var variableName = "string"

Another way is to invoke the string object, and included the sequence of characters within the parentheses of the stated string object, as follows:

var variableName = new string( "string" )

syntax:

var variableName = "string"

var variableName = new string( "string" )

EXAMPLE

var stringValue = "Hi There!!";

document.write( " The message of the day is : " + stringValue );

The Properties of the string Object are:

• length

• prototype

The Methods of the string Object are:

• anchor()

• big()

• blink()

• bold()

• charAt()

• charCodeAt()

• concat()

• fixed()

• fontColor()

• fontSize()

• fromCharCode()

• indexOf()

• italics()

• lastIndexOf()

• link()

• match()

• replace()

• search()

• slice()

• small()

• split()

• strike()

• sub()

• subStr()

• subString()

• sup()

• toLowerCase()

• toUpperCase()