JavaScript String toUpperCase() method
- Previous page toString()
- Next page trim()
- Go up one level JavaScript String Reference Manual
Definition and usage
toUpperCase()
The method converts the string to uppercase letters.
toUpperCase()
The method does not change the original string.
See also:
Example
Convert to uppercase:
let text = "Hello World!"; let result = text.toUpperCase();
Syntax
string.toUpperCase()
Parameter
No parameters.
Return value
Type | Description |
---|---|
String | Convert to uppercase string. |
Browser support
toUpperCase()
Is ECMAScript1 (ES1) feature.
All browsers fully support ES1 (JavaScript 1997):
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Supported | Supported | Supported | Supported | Supported | Supported |
- Previous page toString()
- Next page trim()
- Go up one level JavaScript String Reference Manual