For the Hosts Locale how to convert a string to uppercase letters in JavaScript?

HTMLProgramming ScriptsJavascript

To convert a string to uppercase letters in JavaScript, use the toLocaleUpperCase() method.

Example

You can try to run the following code to learn how to work with toLocaleUpperCase() method in JavaScript −

Live Demo

<!DOCTYPE html>
<html>
   <body>
      <script>
         var a = "amit";
         document.write(a.toLocaleUpperCase());
      </script>
   </body>
</html>
raja
Published on 26-Feb-2018 06:48:55
Advertisements