Created
April 7, 2019 18:39
-
-
Save khaosdoctor/757125b90e3f1043bc0905a092739cff to your computer and use it in GitHub Desktop.
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
Promise.all([ | |
new Promise(resolve => setTimeout(() => resolve([]), 5500)), | |
new Promise(resolve => setTimeout(() => resolve([1]), 3000)), | |
new Promise(resolve => setTimeout(() => resolve([1,2]), 2200)) | |
]) | |
.then(results => results.length) | |
.then(c => console.info(c)) | |
.catch(err => console.error(err)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment