Created
August 5, 2020 10:43
-
-
Save dnshko/8fd9c56db1e30a4f26d84270296635eb 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
// Second promise relies on the result of first promise | |
const getIdFromUser = (users) => { | |
return new Promise((resolve, reject) => { | |
return setTimeout(() => resolve(users.id), 500) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment