JavaScript toLowerCase

The JavaScript toLowerCase method converts the given string into Lowercase letters. The syntax of the toLowerCase function is


JavaScript toLowerCase Example

The following set of examples helps you understand the toLowerCase Function.

The second JavaScript statement, Str3, converts the above-declared Str1 string into lowercase.

Instead of declaring and assigning the string, we can also use the function on a string literal directly. The folding two lines for Str4 and Str5 use the same.

<!DOCTYPE html>
    <title> JavaScriptToLowerCase </title>
    <h1> JavaScriptToLowerCase </h1>
 var Str1 = "Learn JavaScript at Tutorial Gateway";
 var Str3 = Str1.toLowerCase();
 var Str4 = "Hi, This is FROM JS".toLowerCase();
 var Str5 = "JAVASCRIPT LOWERCASE".toLowerCase();

 document.write("<b> Lowercase Letters are:</b> " + Str3);
 document.write("<br \> <b> Lowercase Letters are: </b> " + Str4);
 document.write("<br \> <b> Lowercase Letters are: </b> " + Str5);
JavaScript ToLowerCase Example

About Suresh

Suresh is the founder of TutorialGateway and a freelance software developer. He specialized in Designing and Developing Windows and Web applications. The experience he gained in Programming and BI integration, and reporting tools translates into this blog. You can find him on Facebook or Twitter.