JavaScript String Object

« Previous Chapter Next Chapter »

The String object is used to manipulate a stored piece of text.

Complete String Object Reference

For a complete reference of all the properties and methods that can be used with the String object, go to our complete String object reference.

The reference contains a brief description and examples of use for each property and method

String object

The String object is used to manipulate a stored piece of text.

Examples of use:

The Below example uses the length property of the String object to find the length of a string:

var txt="Hai Everyone!";
document.write(txt.length);

The code above will result in the following output:

12

The Below example uses the toUpperCase() method of the String object to convert a string to uppercase letters:

var txt="Hai Everyone!";
document.write(txt.toUpperCase());

The code above will result in the following output:

Hai Everyone!

« Previous Chapter Next Chapter »

Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!