Explore Courses Blog Tutorials Interview Questions
0 votes
in Java by (13.1k points)
Can anyone help me how I can able to perform the case sensitive string comparison using JavaScript?

1 Answer

0 votes
by (26.7k points)

You can use the toUpperCase method to do that:

var areEqual = string1.toUpperCase() === string2.toUpperCase();

I hope this will help.

Want to know more about Java? Prefer this tutorial on Learn Java.

Want to become a Java Expert? Join Java Course now!!

Browse Categories