title: Calculations using loops based on age
body: <p>I'm am writing code which calculates an insurance premium up to the 65th birthday.</p>
  
  <p>So far I've come up with this, but I'm getting tangled up in the loop:</p>
  
  <pre><code>function showQuote(bday,bmonth,byear)
  {
  
  
      var DoB = new Date(byear,bmonth,bday) 
      var todayDate = new Date();
      todayYear = todayDate.getFullYear();
      todayMonth = todayDate.getMonth();
      todayDay = todayDate.getDate();
      var userAge;
  
  
      userAge = todayYear - byear;
  
      if(todayMonth &lt; (bmonth - 1 ))
      {
  
      userAge--;
  
      }
  
      else if (((bmonth - 1) == todayMonth) &amp;&amp; (todayDay &lt; bday))
  
      {
  
      userAge--;
  
      }
  
  document.getElementById("ageResult").innerHTML = "You are currently: " 
  + userAge;
  
  var displayQuote = 0;
  
      for (Age = userAge; Age &lt;= 65; Age--)
  
      {
      displayQuote = 500-(500*(65-Age)/100);
      return displayQuote;
      }
  }
  </code></pre>
  
  <p>What I would like to do is display the first 3 years and then the 65th year. </p>