Created
February 15, 2022 18:42
-
-
Save antondevv/43752b3a5be71da91be643800288dfbd to your computer and use it in GitHub Desktop.
Promise chain
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 myPromises = urls.map((url) => fetch(url).then((res) => res.json())); | |
Promise.all(myPromises).then((data) => { | |
// When all requests have finished | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment