• JavaScript Video Tutorials

JavaScript String - toLocaleUpperCase() Method



Description

This method is used to convert the characters within a string to uppercase while respecting the current locale. For most languages, it returns the same output as toUpperCase.

Syntax

Its syntax is as follows −

string.toLocaleUpperCase( )

Return Value

Returns a string in uppercase with the current locale.

Example

Try the following example.

<html>
   <head>
      <title>JavaScript String toLocaleUpperCase() Method</title>
   </head>
   
   <body>   
      <script type = "text/javascript">
         var str = "Apples are round, and Apples are Juicy.";
         document.write(str.toLocaleUpperCase( ));
      </script>      
   </body>
</html>

Output

APPLES ARE ROUND, AND APPLES ARE JUICY.  
javascript_strings_object.htm
Advertisements