title: how to return response of axios in return
body: <p>I want to return the response of axios but always the response that returned is undefined:</p>
  
  <pre><code>wallet.registerUser=function(data){
  axios.post('http://localhost:8080/register',{
  phone:data.phone,
  password:data.password,
  email:data.email
  }).then(response =&gt;{
    return response.data.message;
    console.log(response.data.message);
  }).catch(err =&gt;{
    console.log(err);
  })
  }
  
  console.log(wallet.registerUser(data));
  </code></pre>
  
  <p>The console always logs as undefined. Is their any way returning this response.</p>