Created
July 29, 2016 10:53
-
-
Save nchanged/42e57a41d3bfd4e767857a8772e2708f 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 wait1 = (fn) => { | |
return new Promise(resolve => setTimeout(resolve, 100)) | |
} | |
const wait2 = (fn) => { | |
return new Promise(resolve => setTimeout(resolve, 200)) | |
} | |
const wait3 = (fn) => { | |
return new Promise(resolve => setTimeout(resolve, 300)) | |
} | |
wait1() | |
.then(wait2) | |
.then(wait3) | |
.then(function() { | |
console.log("All good!"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment