Home >>JavaScript String Methods >JavaScript String toLocaleUpperCase() Method

JavaScript String toLocaleUpperCase() Method

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 Values

Parameter Description
   

Browser Support

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>
Output:

Click the button to see the Output.

 


No Sidebar ads