How to convert a string into the lower case using JavaScript?

JavascriptWeb DevelopmentFront End Technology

To convert a string into lower case, use the JavaScript toLowerCase() method. This method returns the calling string value converted to lowercase.

Example

You can try to run the following code to convert a string into the lower case −

Live Demo

<html>
   <head>
      <title>JavaScript String toLowerCase() Method</title>
   </head>

   <body>
      <script>
         var str = "DEMO TEXT";
         document.write(str.toLowerCase( ));
      </script>
   </body>
</html>
raja
Published on 18-Jan-2018 12:15:55
Advertisements