Learning Challenge
Control Flow Using Conditionals
Vowel Counter
Write a function, countVowels(word)
, that takes in a string word
and returns the number of vowels in the word.
Vowels are the letters “a”, “e”, “i”, “o”, “u”.
Question
What is wrong with my code I have been working on it for days.
What I’ve tried
I have tried searching on Stack Overflow for code that can accomplish the task.
I have found code, but the code I found on StackOverflow uses methods I have not learned yet.