Home >>JavaScript String Methods >JavaScript String toLocaleUpperCase() Method
JavaScript toLocaleUpperCase() method is used to convert a given input string in to uppercase letters according to the current locale value.
Syntax:
string.toLocaleUpperCase()
Parameter | Description |
---|---|
Method | Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
toLocaleUpperCase() | Yes | Yes | Yes | Yes | Yes |
Here is an example of toLocaleUpperCase() method:
<html> <body> <p>Click the button to see the Output.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var str = "jerry"; var res = str.toLocaleUpperCase(); document.getElementById("demo").innerHTML = res; } </script> </body> </html>
Click the button to see the Output.