Count the vowels · Hitung huruf vokal
Count the vowels
Count the vowels (a e i o u) in a String, treating upper- and lower-case the same. Lower-case it first with s.toLowerCase(), then loop with s.charAt(i) and compare against each vowel.
Hitung vokal
Hitung huruf vokal (a e i o u) dalam sebuah String, dengan menganggap huruf kapital dan kecil sebagai sama. Ubah ke huruf kecil terlebih dahulu dengan s.toLowerCase(), lalu lakukan perulangan dengan s.charAt(i) dan bandingkan terhadap setiap huruf vokal.
Complete countVowels(String s) so it returns how many letters are vowels (a, e, i, o, u), ignoring case. · Lengkapi countVowels(String s) agar mengembalikan jumlah huruf yang merupakan vokal (a, e, i, o, u), tanpa memperhitungkan besar kecilnya huruf.
Click Run to see the output here. · Klik Jalankan untuk melihat output di sini.