I\'m supposed to write a function that takes a character (i.e. a string of length 1) and returns true if it is a vowel, false otherwise. I came up with two functions, but do
function findVowels(str) { return str.match(/[aeiou]/ig); } findVowels('abracadabra'); // 'aaaaa'
Basically it returns all the vowels in a given string.