title: clearInterval is not clearing setInterval
body: <p>I have made a memory game with a timer that start at 10 minutes and counts down every second to 0. This function is only called once and has the following setInterval function:</p>
  
  <pre><code>game.countdown = setInterval(function() {
                      if(game.timeLeft &lt;= 0){
                          gameEnded = true;
                      }
  
                      if(!gameEnded){
                          // lower one second
                          game.timeLeft--;
  
                          var timespan = document.querySelector('.timeleft');
  
                          var minutes =  pad(Math.floor((game.timeLeft / 60)),2 );
                          var newSeconds =  pad(Math.floor(game.timeLeft - (minutes * 60)),2 );
  
                          function pad(num, size) {
                              var s = num+"";
                              while (s.length &lt; size) s = "0" + s;
                              return s;
                          }
  
                          var niceTime = minutes + ":" + newSeconds;
  
                          timespan.innerHTML = niceTime;
  
                          // Then alter time bar on .innertimer
                          // Calculate percentage starting at 0%
                          var percentageDone = (Math.floor((10*60 - game.timeLeft) / (10*60) * 10000) / 100);
                          $(".timer").css({"background": "-webkit-linear-gradient(left, white " + percentageDone + "%, green " + percentageDone + "%)"});
                      }
                  }, 1000);
  </code></pre>
  
  <p>I store the setInterval in object game under variable name countdown. When the game is ended I call another function that has the clearInterval:</p>
  
  <pre><code>clearInterval(game.countdown);
  </code></pre>
  
  <p>Then when it goes to the next level it calls the setInterval function again and stores it again in game.countdown. But now for every second it takes 2 seconds. The next level 3 seconds. You can see there are multiple setInterval's at work because it's not done at the same time.</p>
  
  <p>Hope someone can really help me out debugging this problem.</p>