title: How to save data in variable from HTTP request using Node Fetch?
body: <p>Im trying to save data from GET request into variable using node-fetch, but i got the some result!
  When i console log the response, i can see it. But when i assign the resData into variable, i get undefined.</p>
  <pre><code>const fetch = require('node-fetch');
  
  async function fetchData(){
  const response = await fetch(url, options)
  const resData = await response.json();
  console.log(resData);
  return resData; 
   };
   
  let myApps
   
  fetchData((data)=&gt;{
   myApps = data;
  });
   
  console.log(myApps);
  </code></pre>
  <p>result ==&gt; undefined</p>
  <p>Someone can help ME!</p>