toLowerCase()

The toLowerCase() method is used to convert all of the string charaters specified to lower case characters, regardless of where they came from or what their original capitalization was. This method is used with a String object.

syntax:

stringName.toLowerCase

EXAMPLE

var upperString = new String("THIS IS THE STRING TEXT.");

document.write(upperString.toLowerCase() );

The example shows a new String being created which contains the text "This is the string text.". The document.write statement is then used to write the text to the screen utilizing the toLowerCase() method to tell the browser to display the text in all lowercase letters, as shown in the following ouput:



this is the string text.