title: Javascript countdown timer with 05 instead of 5 seconds?
body: <p>I have created this one in JavaScript! It is a timer counting down time from 14:59 to 00:00 minutes. What I need to do is prevent seconds from going into one digit.<br><br></p>
  
  <p>For example:<br>
  14:05 - allowed and needed to achieve<br>
  14:5 - not allowed and I need to get rid of this situation.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript"&gt;
          var interval;
          var minutes = 14;
          var seconds = 05;
          window.onload = function () {
              countdown('atskaite');
          }
  
          function countdown(element) {
              interval = setInterval(function () {
                  var el = document.getElementById(element);
                  if (seconds == 0) {
                      if (minutes == 0) {
                          clearInterval(interval);
                          return;
                      } else {
                          minutes--;
                          seconds = 60;
                      }
                  }
                  el.innerHTML = minutes + ':' + seconds;
                  seconds--;
              }, 1000);
          }
      &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div id="atskaite"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><br>Any help, please?</p>