JavaScript Program to Compare Two Strings
// js program to perform string comparison
const string1 = 'JavaScript Program';
const string2 = 'javascript program';
// compare both strings
const result = string1.toUpperCase() === string2.toUpperCase();
if(result) {
console.log('The strings are similar.');
} else {
console.log('The strings are not similar.');
}
Output
The strings are similar.
