Count Vowels
function countVowels (sentence) {
const vowels = 'aiueoAIUEO';
let count = 0;
for (let char of sentence) {
if (vowels.includes(char)) {
count++
}
}
return count;
}
const Sentence = countVowels('Saya Suka Sama Kamu');
console.log(`Jumlah Vokak : ${Sentence}`);INFO