title: How to check if string has vowels?
body: <p>I tried to write a function which checks if a given string contains vowels and I cannot see why it works for some words 'cat' and 'why' but not 'DOG', i believe that i have accounted for uppercase.</p>
  <pre><code>const containsVowels = string =&gt; {
  
    var lowerCase = string.toLowerCase();
    var word = lowerCase.split(&quot;&quot;);
    var vowelsArray = [&quot;a&quot;,&quot;o&quot;,&quot;i&quot;,&quot;u&quot;,&quot;y&quot;];
  
  const result = word.filter(letter =&gt; vowelsArray.includes(letter));
  
  return result.includes(&quot;a&quot;,&quot;o&quot;,&quot;i&quot;,&quot;u&quot;,&quot;y&quot;);
  </code></pre>
  <p>};</p>