title: Reset setInterval() from object
body: <p>I am playing with VueJS and created a simple counter. I'd like to reset the <code>setInterval()</code> method from the <code>resetTimer()</code> function. However, it's not working. Not sure what I'm missing here.</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-js lang-js prettyprint-override"><code>new Vue({
      el: '#app',
      data: {
          hours: 0,
          minutes: 0,
          seconds: 0,
          counter: 0
      },
      methods: {
          timer() {
                  setInterval(() =&gt; {
                      this.seconds = this.timerFormat(++this.counter % 60)
                      this.minutes = this.timerFormat(parseInt(this.counter / 60, 10) % 60)
                      this.hours = this.timerFormat(parseInt(this.counter / 3600, 10))
                  }, 1000);
              },
              resetTimer() {
                  clearInterval(this.timer())
              },
              timerFormat(timer) {
                  return timer &gt; 9 ? timer : '0' + timer;
              }
      }
  })</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://unpkg.com/vue/dist/vue.js"&gt;&lt;/script&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Lean Vue&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="app"&gt;
        &lt;p&gt;{{ hours }} : {{ minutes }} : {{ seconds }}&lt;/p&gt;
        &lt;button @click="timer"&gt;Start&lt;/button&gt;
        &lt;button @click="resetTimer"&gt;Pause&lt;/button&gt;
      &lt;/div&gt;
  
      &lt;script src="dist/bundle.js"&gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>