Program JavaScript untuk Melakukan Perbandingan String Case Insensitive

Contoh 1: Menggunakan toUpperCase() // program to perform case insensitive 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.’); } Keluaran The strings are similar. Dalam program di […]

Read more ยป