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' });