title: Why can't I use Regex to evaluate if...else statement
body: <p>I'm trying to use regex to evaluate whether the <code>newArray</code> at index 0 is equivalent to the value stored in <code>vowel</code>. I know that this method doesn't work but I don't understand why.
  BTW I've just started learning how to code so I only really know Vanilla JS</p>
  <pre><code>function translate(val) {
      let newArray = Array.from(val)
      let vowel = /^[aeiouy]/gi
      let consonant = /[^aeiouy]/
      if (newArray[0] == vowel) {
          return 'vowel';
      } else if (newArray[0] == consonant) {
          return 'consonant'
      } {
          return 'none';
      }
  }
   translate('inglewood')
  </code></pre>