Skip to content

Count the vowels

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.

Log in or create account

IGCSE & A-Level