title: How to make JavaScript else if statements less messy?
body: <p>How can I make the following else if statements less messy?</p>
  
  <pre><code>var visas = ["Blue-Collar Worker", "Business", "Foreign Student", "Internship", "Investment", "Joining Foreign Family", "Joining Minors", "Joining Taiwanese Family", "Studying Mandarin Chinese", "Tourism", "Visa-Exempt Entry", "Visiting Family", "Religious Work", "White-Collar Worker"];
  
  var visaOld = $('#inputVisaOld').val(); var visaNew = $('#inputVisaNew').val();
  
  if (visaOld === 'Studying Mandarin Chinese' &amp;&amp; visaNew === 'Foreign Student') {
    return '&lt;div class="alert alert-info"&gt;Documents for FR -&gt; FS&lt;/div&gt;'; 
  } else if (visaOld === 'Visa-Exempt Entry' &amp;&amp; visaNew === 'White-Collar Worker') {
    return '&lt;div class="alert alert-info"&gt;&lt;a class="alert-link"&gt;Visitor Visa for Employment Purpose&lt;/a&gt;&lt;/div&gt;'; 
  } else if (visaOld === 'Tourism' &amp;&amp; visaNew === 'Joining Taiwanese Family') {
    return '&lt;div class="alert alert-info"&gt;Documents for P -&gt; TS&lt;/div&gt;'; 
  } else {
    return '&lt;div class="alert alert-danger"&gt;Not allowed to change&lt;/div&gt;'; 
  }
  </code></pre>
  
  <p>I thought about turning it into <code>switch</code> statements but I need to declare statements in each block and I think that's not possible with <code>switch</code>?</p>