title: Is there a better way to phrase this if statement from having many possible conditions?
body: <p>I'm making a code where I need to determine if a letter is a consonant or a vowel. I'm trying to find a way to simplify my if statement, but I don't know of any way except an if statement with multiple ||possible statements. Is there any way to do this where it encompasses all of the letters in one condition, for example: <code>if(myStr === 'a', 'e', 'i', 'o', 'u') {}</code>? I have other variables I haven't used yet, but here's my code:</p>
  <pre><code>class Word {
    constructor(x, y, str) {
      this.x = x;
      this.y = y;
      this.str = str;
    }
    I
    //Find out the word's composition of consonants and vowels and divide word into sections
    divSect(word) {
      var newStr = this.str.split(&quot;&quot;);
      for(var i = 0; i &lt; newStr.length; i ++) {
        if(newStr[i] === &quot;a&quot; || newStr[i] === &quot;e&quot; || newStr[i] === &quot;i&quot; || newStr[i] === &quot;o&quot; || newStr[i] === &quot;u&quot;) {
          console.log(&quot;test&quot;);
        }
      }
    }
    
    
  }
  </code></pre>