title: if else statement in javascript is not working. only in else statement
body: <p>Sorry, i'm still new here. i just want to know where's my error here. my else statement is not working. but the if statement is working. lets assume that all my variables are correct though my conditional statement isnt. i really need help, im stuck here. </p>
  
  <p>expecting result:</p>
  
  <p>i need to add 13 options for my select. but when my if statement is done, and the else statment will take over the variable <code>hr1</code>, it stop and skip the process. wherein the option is not added. </p>
  
  <p>for example:</p>
  
  <pre><code>hr1 = 9
  convertedVar = 20
  </code></pre>
  
  <p>->it will only add the option when the condition is satisfied, <code>if(hr1 &lt;= convertedVar)</code>  and then else will skip.</p>
  
  <p>thank you for you help.</p>
  
  <pre><code>if(a==mod)
  {
      for(i = 0; i &lt;= 13 ; i++) 
      { 
          if(hr1 &lt;= convertedVar)
          {
          document.getElementById('timeId').options[i] = new Option('---','');
          hr1++;
          hr2++;
          }
          else
          {
          document.getElementById('timeId').options[i] = new Option(h1++ + ':00', hr2++ + ':00');
          }   
      }
  }
  </code></pre>