JavaScript & jQuery Tutorials

JS Home Right Arrow JS Reference Right Arrow String Right Arrow toUpperCase()

toUpperCase()  String  instance method

Description

Returns the value of a string converted to upper case.

  • The string to be converted is not modified.

Syntax


Signature Description
aString.toUpperCase()Returns the value of a string converted to upper case.

Parameters

None.

Examples

The code below returns the value of a string converted to upper case.


// Create a String object.
someString = new String("Learn Javascript");
// Return string value converted to upper case.
alert(someString.toUpperCase()); 


Press the button below to action the above code:

Related Tutorials

JavaScript Basic Tutorials - Lesson 8 - Strings



  

go to home page Homepage go to top of page Top