The JavaScript string toLocaleUpperCase() method transforms the given string into an uppercase letter on the basis of the current locale of the host.
Note: A string can be converted into upper case letters with the toUpperCase() method but the result may vary according to locale or language. To overcome this problem we have to use toLocaleUpperCase().
Syntax:
string.toLocaleUpperCase()
Return:
Locale-specific string with upper case letters.
Example:
<!DOCTYPE html> <html> <body> <script> var a ="Hello World!"; document.write(a.toLocaleUpperCase()); </script> </body> </html>