Count Syllables
STRING

Problem

Given a string s, return the count of vowels (a, e, i, o, u) in it, which represent syllables.

Examples

countSyllables("abc"); // returns 1 countSyllables("test"); // returns 1 countSyllables("hello"); // returns 2 countSyllables("syllable"); // returns 2
Loading...