Async/Await (JavaScript)
MediumComplete 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.