Skip to content

Instantly share code, notes, and snippets.

@s-taylor
Last active September 27, 2017 22:52
Show Gist options
  • Save s-taylor/2f02c548206ee4bb58f1d06d436c97ae to your computer and use it in GitHub Desktop.
Save s-taylor/2f02c548206ee4bb58f1d06d436c97ae to your computer and use it in GitHub Desktop.
Understanding async await - part 9
async function fetchStuff(data) {
  const page = data.page;
const results = await fetchResults(page);
  return res.results;
}
fetchStuff()
.catch(err => { /* handle error here */ });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment