Function is returning a promise instead of a actual value : <p>I have this function below:</p>

<pre><code>function getProfile(username) {
  return axios.get('https://api.github.com/users/' + username)
    .then(function(user) {
      return user.data;
    });
}
</code></pre>

<p>When I call it like this:</p>

<pre><code>console.log(getProfile('test_user'));
</code></pre>

<p>I am getting back an <code>Object</code> being printed out instead of <code>user.data</code>. In my <code>getProfile</code> function I said return <code>user.data</code> but it's not returning that.</p>
