This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

toUpperCase

Summary

Converts all the alphabetic characters in a string to uppercase.

Syntax

strVariable.toUpperCase()

"String Literal".toUpperCase()

Examples

The following example demonstrates the effects of the toUpperCase method:

var str1 = "This is a STRING.";
 var str2 = str1.toUpperCase();
 document.write(str2);

 // Output: THIS IS A STRING.

Remarks

The toUpperCase method has no effect on non-alphabetic characters.

See also

Other articles

Attributions

  • Microsoft Developer Network: Article