title: how to add onclick event to start timer
body: <p>New to coding. Created a timer that I would like to start when "gameStart" button is pushed, instead of on page load. Not sure where to insert my "onclick". Thank you </p>
  
  <pre><code>&lt;div id= "startButtons"&gt;
          &lt;button  id= "gameStart"&gt;Get Going!&lt;/button&gt;
  
  &lt;script&gt;
  
  var timeleft = 15;
  
  var downloadTimer = setInterval(function function1(){
    document.getElementById("countdown").innerHTML = timeleft + 
  "&amp;nbsp"+"seconds remaining";
  
    timeleft -= 1;
    if(timeleft &lt;= 0){
      clearInterval(downloadTimer);
      document.getElementById("countdown").innerHTML = "Time is up!"
    }
  }, 1000);
  
      console.log(countdown);
  
  &lt;/script&gt;
  </code></pre>