![]() |
VOOZH | about |
The String.prototype.toLocaleUpperCase() method in JavaScript is a Standard built-in object which returns the calling string value converted to the uppercase letter on the basis of the host's current locale. This method mostly returns a similar result as the string toUppercase() method
str.toLocaleUpperCase()
str.toLocaleUpperCase(locale)
This method returns a string of uppercase letters.
This method gives two kinds of errors, which are as follows:
Example 1: In this example, we will convert some lowercase strings into uppercase letters using the String.prototype.toLocaleUpperCase() method in JavaScript.
EN-US: GEEKSFORGEEKS TR: GEEKSFORGEEKS Result: STRING.PROTOTYPE.TOLOCALEUPPERCASE()
Example 2: In this example, we will convert some lowercase strings into uppercase letters using the String.prototype.toLocaleUpperCase() method in JavaScript.
ALPHABET false true true
The browsers supported by the String.prototype.toLocaleUpperCase() method are listed below: