Created
September 26, 2016 20:40
-
-
Save artlogic/c83b9671a435a492c5b72344f56e6696 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 timeout = 5000; // 5 seconds | |
var p = new Promise(function (resolve, reject) { | |
setTimeout(function () { | |
resolve(); | |
}, timeout); | |
}); | |
p.then(function () { | |
console.log('this will run after 5 seconds!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment