title: Returning an object from fetch API with async await
body: <p>I'm having trouble returning an object from a fetch request.</p>
  <p>When I log this to console, it says the promise is pending but [[PromiseResult]] in Dev Tools shows the object correctly.</p>
  <p>What would be the most effective way to return this?</p>
  <pre><code>async function() {
  
      const response = await fetch(`url`);
  
      const jsonResponse = await response.json();
      if (!jsonResponse) {
          return [];
      }
      return jsonResponse; 
  } 
  </code></pre>