Created
August 5, 2020 10:47
-
-
Save dnshko/68465453c969476661d1d50a9d0f2163 to your computer and use it in GitHub Desktop.
Promise
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 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