Skip to main content
Version: 3.45.0

String.prototype.toUpperCase()

The toUpperCase() method returns the calling string value converted to uppercase (the value will be converted to a string if it isn't one).

Syntax​

toUpperCase()

Return value​

A new string representing the calling string converted to upper case.

Exceptions​

Description​

The toUpperCase() method returns the value of the string converted to uppercase. This method does not affect the value of the string itself since JavaScript strings are immutable.