Stopbyte

How to get the lowercase equivalent of a string in Javascript?

Hi,

I want to compare two strings, but with ignoring the case of both strings, so I need to get the lowercase of both strings then compare them! I am using Javascript!

How can I get the lowercase equivalent of a string?

thanks

1 Like

The string Javascript class has a toLowerCase() method you can use to get the lowercase equivalent of your string.

Examples:

myString.toLowerCase();
// These are similar...
"My String".toLowerCase();