Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

JavaScript toUpperCase() Method

JavaScript toUpperCase() Method

String Object Reference JavaScript String object


Definition and Usage

The toUpperCase() method is used to convert a string to uppercase.

Syntax

string.toUpperCase()


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the toUpperCase() method


Example

Example

Converts a string to uppercase:

var

str

=

"

Runoob

"

;

document

.

write

(

str

.

toUpperCase

(

)

)

;

Try it »


String Object Reference JavaScript String object