title: Why does this vowel counting fail?
body: <pre><code>function VowelCount(str) {
    var counter=0;
    for(i=0; i&lt;str.length; i++)
    {
      if (/[AEIOUaeiou]/g.test(str[i]))
      {
        counter += 1;
      }
    }
    return counter; 
  }
  
  VowelCount("aaaeeebziiiooouu");
  </code></pre>
  
  <p>This returns "14" on repl.it, but returns only "7" on coderbyte.</p>
  
  <p>What have I missed?</p>