Answers for "Javascript case insensitive string comparison"

3

Javascript case insensitive string comparison

var name1 = "Taylor Johnson";
var name2 ="taylor johnson";

//convert to lowercase for case insensitive comparison
if(name1.toLowerCase() === name2.toLowerCase()){
    //names are the same
}
Posted by: Guest on July-25-2019

Code answers related to "Javascript case insensitive string comparison"

Code answers related to "Javascript"

Browse Popular Code Answers by Language