title: Axios prints value on console but returns undefined
body: <p>I have quite an issue for some time and is getting on my nerves and it doesn't make sense. I have used axios on my react frontend and it works perfect when assigning the get value to the state. But when using it in a normal javascript code, I appear to have this following issue: i can print the object's value in the console but it will return only undefined.. Here is my 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-html lang-html prettyprint-override"><code>login = () =&gt; {
          let data;
          axios.get('https://myaddress/authenticate')
              .then(response =&gt; {
                  data = response;
                  console.log('data here', data);
              })
              .catch(error =&gt; {
                  console.error('auth.error', error);
              });
          console.log('eee', data);
          return data;
      };</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here we are talking about axios strictly.</p>