title: Is "if" or "switch" preferable Javascript
body: <p>I am building a function which verifies a user's input makes sense in context of the application before it runs a block of code. I'm wondering whether an "if...else" statement like this or a switch statement is going to work more reliably/otherwise be a better solution? I lean toward if...else because I only have two outcomes--the user's input is either valid or tell the user what the program will accept, but I would like advice from somebody more experienced before I get too involved.</p>
  
  <p>edit: For clarity, I only want my code to execute when i and o are both either "a" or "b", or both either "c" or "d", or both either "e" or "f".</p>
  
  <pre><code>    console.log("i="+i+" o="+o);
      if      
      (((i == ("a" || "b")) &amp;&amp; (o == ("a" || "b")))
      ||  ((i == ("c" || "d")) &amp;&amp; (o == ("c" || "d")))
      ||  ((i == ("e" || "f")) &amp;&amp; (o == ("e" || "f"))))
      {
          //my block here
      }       
      else
      {
          //tell the user their input doesn't make sense
      }
  </code></pre>
  
  <p>Also, am I handling my Boolean operators correctly in this case?</p>