-
-
Save pionize/f0317ffce7afc86e7819d0cd5d6cd4e3 to your computer and use it in GitHub Desktop.
Async/Await
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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