title: How to return values from async functions using async-await from function?
body: <p>How can I return the value from an async function?
  I tried to like this</p>
  
  <pre><code>const axios = require('axios');
  async function getData() {
      const data = await axios.get('https://jsonplaceholder.typicode.com/posts');
      return data;
  }
  console.log(getData());
  </code></pre>
  
  <p>it returns me this,</p>
  
  <pre><code>Promise { &lt;pending&gt; }
  </code></pre>