What is toLowerCase () used for in JavaScript ?
Last Updated :
29 Jan, 2024
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);
|
Share your thoughts in the comments
Please Login to comment...