Program JavaScript untuk Memeriksa Apakah String Dimulai dan Diakhiri Dengan Karakter Tertentu

Contoh 1: Periksa String Menggunakan Metode Bawaan // program to check if a string starts with ‘S’ and ends with ‘G’ function checkString(str) { // check if the string starts with S and ends with G if(str.startsWith(‘S’) && str.endsWith(‘G’)) { console.log(‘The string starts with S and ends with G’); } else if(str.startsWith(‘S’)) { console.log(‘The string […]

Read more ยป

Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /home/breatgem/widiyanata.com/wp-includes/functions.php on line 4755