title: Cannot get the response made from axios call
body: <p>I'm making an API call using axios library in my react project. While I can console.log my response object, returning the same gives <code>undefined</code>. Any hints at where I'm committing a mistake?</p>
  
  <pre><code>var axios=require('axios');
  
  module.exports={
  
      fetch:function(){   
    var result = axios.get('https://api.github.com/users/renx777' )
                      .then(function(response){
                         console.log(response)
                         // outputs correct response
                         return response// ex.: 200
                      });  
       // outputs undefined
        console.log(result)
  
  
      }
  }
  </code></pre>