Skip to content

Instantly share code, notes, and snippets.

@pionize
Created July 25, 2017 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pionize/f0317ffce7afc86e7819d0cd5d6cd4e3 to your computer and use it in GitHub Desktop.
Save pionize/f0317ffce7afc86e7819d0cd5d6cd4e3 to your computer and use it in GitHub Desktop.
Async/Await
const getUser = async (name) => {
const user = await getUserByName(name);
const account = await getUserAccountById(user.id);
return account;
}
const myUser = getUser('andrew');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment