Last active
February 18, 2019 08:24
-
-
Save DmitryMasley/ecb17772cf6946d12573506a71437c9a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 = new Promise((resolve) => {setTimeout(() => {resolve("success")}, 1000)}); | |
promise1.then((message) => {console.log(`${message} 1`)}); | |
promise1.then(() => {throw "exeption"}); | |
promise1.then((message) => {console.log(`${message} 2`)}); | |
const promise2 = new Promise((resolve) => {setTimeout(() => {resolve("success")}, 2000)}); | |
promise2 | |
.then((message) => {console.log(`${message} 3`)}) | |
.then(() => {throw "exeption"}) | |
.then((message) => {console.log(`${message} 4`)}); | |
console.log("Done"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment