Created
July 6, 2018 17:42
-
-
Save siddrc/63d28d22c1ad39e39d335d722301296a to your computer and use it in GitHub Desktop.
Promises All
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 promise1 = Promise.resolve("This"); | |
const promise2 = Promise.resolve("is"); | |
const promise3 = Promise.resolve("my"); | |
const promise4 = Promise.resolve("first"); | |
const promise5 = Promise.resolve("day"); | |
const promise6 = Promise.resolve("JavaScript"); | |
Promise.all([promise1, promise2, promise3,promise4,promise5,promise6]).then(function(values) { | |
console.log(values.join(" ")); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment