Skip to content

Instantly share code, notes, and snippets.

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