JavaScript String toUpperCase()
Example
Convert to uppercase:
let text = "Hello World!";
let result = text.toUpperCase();
Try it Yourself »
Description
The toUpperCase()
method converts a string to uppercase letters.
The toUpperCase()
method does not change the original string.
Syntax
string.toUpperCase()
Parameters
NONE |
Return Value
Type | Description |
A string | The string converted to uppercase. |
Browser Support
toUpperCase()
is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.