Horje
javascript string insensitive compare Code Example
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
}

how to compare strings in javascript ignoring case sensitive
const str1 = 'Bill@microsoft.com';
const str2 = 'bill@microsoft.com';

str1 === str2; // false
str1.toLowerCase() === str2.toLowerCase(); // true
javascript string insensitive compare
const str1 = 'Bill@microsoft.com';
const str2 = 'bill@microsoft.com';

str1 === str2; // false

// will return 0, means these two strings are equal according to `localeCompare()`
str1.localeCompare(str2, undefined, { sensitivity: 'accent' }); 




Javascript

Related
horizontal tabs in react js Code Example horizontal tabs in react js Code Example
olx clone react Code Example olx clone react Code Example
put logo in qr code in react js qrcode.react Code Example put logo in qr code in react js qrcode.react Code Example
make forn awesome icon clickable in react Code Example make forn awesome icon clickable in react Code Example
javascript select from array where Code Example javascript select from array where Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10