- Instant help with your JavaScript coding problems

Convert string to lowercase with JavaScript

Question:
How to convert string to lowercase with JavaScript?
Answer:
const str = 'This is A Text with Mixed Cases';

const strLower = str.toLowerCase();

console.log(strLower); // this is a text with mixed cases
Description:

You can convert a string value to be all lower case letters using the toLowerCase method. The toLowerCase() method returns the calling string value converted to lower case. The method does not affect the value of the original string itself.

Share "How to convert string to lowercase with JavaScript?"