title: TypeError when trying to assign axios response to data variable in Vue component
body: <p>I'm getting <code>TypeError: Cannot set property 'randomWord' of undefined</code> at this line: <code>this.randomWord = response.data.word;</code></p>
  
  <p><code>console.log(response.data.word)</code> does print out a string.</p>
  
  <p>Vue Component:</p>
  
  <pre><code>&lt;template&gt;
    &lt;div&gt;
      &lt;h2&gt;Wordnik Random Word&lt;/h2&gt;
      &lt;button class="button" @click="getWord"&gt;Random Word&lt;/button&gt;
      &lt;p&gt;The random word is: {{ randomWord }}&lt;/p&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  const axios = require('axios')
  
  export default {
    name: 'RandomWord',
    data() {
      return {
        randomWord: '',
      }
    },
    methods: {
      getWord() {
        axios.get('https://api.wordnik.com/v4/words.json/randomWord', {
            params: {
              api_key: 'XXXXXXXXXX',
              hasDictionaryDef: true,
              minCorpusCount: 4
            }
          })
          .then(function (response) {
            console.log(response.data.word);
            this.randomWord = response.data.word;
          })
          .catch(function(error) {
            console.log(error);
          });
      },
    },
  }
  &lt;/script&gt;
  </code></pre>