Last active
April 7, 2019 18:41
-
-
Save khaosdoctor/3b0f9aec523ee0a7cd1351b3441f6efc 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, reject) => setTimeout(() => reject([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