title: Vue.js calling a method with setTimeout is not working
body: <p>I have a very basic Vue component in which I want to call a method recursively within a <code>setTimeout</code>.</p>
  
  <p>Calling the method (once) from the <code>mounted</code> lifecycle works as expected.
  But then calling itself always gives a <code>Uncaught TypeError: ... is not a function</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-js lang-js prettyprint-override"><code>new Vue({
    el: '#app',
    mounted() {
      this.check();
    },
    methods: {
      check: () =&gt; {
        console.log('Checking');
        
        // error: self.check is not a function
        let self = this;
        setTimeout(function() {
          self.check();
        }, 500);
  
        // error: this.check is not a function
        setTimeout(function() {
          this.check();
        }.bind(this), 500);
  
        // does nothing
        setTimeout(this.check, 500);
  
        // error: this.check is not a function
        setTimeout(() =&gt; {
          this.check();
        }, 500);
      },
    }
  })</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://unpkg.com/vue"&gt;&lt;/script&gt;
  &lt;div id="app"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>