Skip to content

Instantly share code, notes, and snippets.

@dnshko
Created August 5, 2020 10:45
Show Gist options
  • Save dnshko/e129f4ee34949067a728810ffd1c345e to your computer and use it in GitHub Desktop.
Save dnshko/e129f4ee34949067a728810ffd1c345e to your computer and use it in GitHub Desktop.
Promise
const runAsyncFunctions = async () => {
const users = await getUsers()
for (let user of users) {
const userId = await getIdFromUser(user)
console.log(userId)
const capitalizedId = await capitalizeIds(userId)
console.log(capitalizedId)
}
console.log(users)
}
runAsyncFunctions()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment