title: 1 minutes 30 second countdown timer javascript
body: <p>I have the code but it's for 2 minutes timer and  i need it to modify to 1 minutes 30 seconds timer.</p>
  
  <p>I have tried but fails to start timer from 1:30.</p>
  
  <p>As i'm beginner in this line and want to learn how to do that.</p>
  
  <p>here it's the code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id=timer&gt;&lt;/div&gt;
  &lt;script type="text/javascript"&gt;
    var timeoutHandle;
  
    function countdown(minutes, seconds) {
      var seconds = 60;
      var mins = minutes
  
      function tick() {
        var counter = document.getElementById("timer");
        var current_minutes = mins - 1
        seconds--;
        counter.innerHTML =
          current_minutes.toString() + ":" + (seconds &lt; 10 ? "0" : "") + String(seconds);
        if (seconds &gt; 0) {
          timeoutHandle = setTimeout(tick, 1000);
        } else {
  
          if (mins &gt; 1) {
  
            // countdown(mins-1);   never reach “00″ issue solved:Contributed by Victor Streithorst
            setTimeout(function() {
              countdown(mins - 1);
            }, 1000);
  
          }
        }
      }
      tick();
    }
  
    countdown(2);
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>