Count Vowels

Run Settings
LanguageJavaScript
Language Version
Run Command
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}`);
Editor Settings
Theme
Key bindings
Full width
Lines