Open In App

What is toLowerCase () used for in JavaScript ?

Last Updated : 29 Jan, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

The toLowerCase() command in JavaScript is used to convert a string to lowercase letters. It’s a method that you can apply to a string, and it will return a new string with all the alphabetic characters converted to lowercase.

Example: Here, we have used toLowerCase() to convert myString to lowercase.

Javascript




let myString = "Hello, World!";
let lowercaseString = myString.toLowerCase();
 
console.log(lowercaseString);


Output

hello, world!

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads