Answers for "Write an async function in app.js that uses fetch() to make a GET request to the OpenWeatherMap API."

12

async function fetchJson

async function getUserAsync(name) 
{
  let response = await fetch(`https://api.github.com/users/${name}`);
  let data = await response.json()
  return data;
}

getUserAsync('yourUsernameHere')
  .then(data => console.log(data));
Posted by: Guest on February-16-2020

Code answers related to "Write an async function in app.js that uses fetch() to make a GET request to the OpenWeatherMap API."

Code answers related to "Javascript"

Browse Popular Code Answers by Language