title: convert from if else to switch statement
body: <p>I have the following if, else if, else construct and I am just curious how I could convert such as construct into a switch statement.  </p>
  
  <pre><code>var emailSubject = email.subject.toLowerCase(); 
  if(emailSubject.indexOf("account request") &gt;= 0){
       //do acct req
  }else if(emailSubject.indexOf("accounts pending removal for") &gt;= 0){
       //do account removal 
  }else if(emailSubject.indexOf("listserv application") &gt;= 0){
       //do listserv app 
  }else if(emailSubject.indexOf("student organization webmaster transfer request") &gt;= 0){
       //do webmaster xfer 
  }else{
       //do default 
  
  } 
  </code></pre>
  
  <p>My thoughts are but I do not think this is correct:</p>
  
  <pre><code>switch(emailSubject){
      case this.indexOf("account request"):
         //do acct request 
         break;
      default:
         //do default 
  }
  </code></pre>
  
  <p>Or </p>
  
  <pre><code>switch(0){
     case emailSubject.indexOf("accounts pending removal"):
       //process account pending removal 
       break;
     default:
       //do default behavior 
  }
  </code></pre>