Created
May 25, 2017 15:16
-
-
Save erikfig/e36ba3b0bdbd02fc0ebdbabe14111727 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
function promise1() { | |
return new Promise((resolve, reject) => { | |
console.log(1) | |
return resolve(); | |
}) | |
} | |
function promise2() { | |
return new Promise((resolve, reject) => { | |
console.log(2) | |
return resolve(); | |
}) | |
} | |
function promise3() { | |
return new Promise((resolve, reject) => { | |
console.log(3) | |
return resolve(); | |
}) | |
} | |
function promise4() { | |
return new Promise((resolve, reject) => { | |
console.log(4) | |
return resolve(); | |
}) | |
} | |
function promise5() { | |
return new Promise((resolve, reject) => { | |
console.log(5) | |
return resolve(); | |
}) | |
} | |
promise1() | |
.then(() => promise2()) | |
.then(() => promise3()) | |
.then(() => promise4()) | |
.then(() => promise5()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment