Created
March 14, 2017 06:46
-
-
Save RusAlex/95de30da6e22a36f52cf4fc71417d907 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
var p1 = new Promise(function(resolve, reject) { | |
console.log('resolving'); | |
resolve('Success!'); | |
}); | |
setTimeout(() => { | |
p1.then(function(value) { | |
console.log(value); // Success! | |
}, function(reason) { | |
console.log(reason); // Error! | |
}); | |
}, | |
10000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment