Skip to main content

Async/Await (JavaScript)

Medium

Complete the async function so it waits for the fetch and returns parsed JSON.

 function getData(url) {
  const res =  fetch(url);
  return  res.json();
}
Need a hint?

Mark the function, then await the two promises.