title: Unexpected token else when using if, else if and else
body: <p>I am getting an error in the code below. Tried all combinations of if and elseif but can't get it to work.</p>
  
  <p>The error: Uncaught SyntaxError: Unexpected token else</p>
  
  <pre><code>if(disableAd == 0 &amp;&amp; disableWeather == 0) {
      window.setTimeout(function(){
          window.location.href = "depart18_ad_P.php";
      }, RefreshRate);
  } elseif(disableWeather == 0) {
      window.setTimeout(function(){
          window.location.href = "weather.php";
      }, RefreshRate);
  } else {
      window.setTimeout(function(){
          window.location.href = "depart18_P.php";
          }, RefreshRate);
  }
  </code></pre>
  
  <p>Many thanks in advance for your time.</p>