Last active
March 28, 2017 01:30
-
-
Save armenr/d083376d51ab6fe4bfa3153408095d4b to your computer and use it in GitHub Desktop.
Simple promise
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
require('es6-promise'); | |
// setTimeout(function() { console.log('TIMED OUT!') }, 300); | |
var promise = new Promise((fulfill, reject) => { | |
setTimeout(() => { | |
fulfill("FULFILLED!") | |
}, 300) | |
}) | |
.then((successMessage) => { | |
console.log(successMessage) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment