Skip to content

Instantly share code, notes, and snippets.

@korenyushkin
Created February 5, 2016 14:25
Show Gist options
  • Save korenyushkin/b2871b28dfa12fbc23db to your computer and use it in GitHub Desktop.
Save korenyushkin/b2871b28dfa12fbc23db to your computer and use it in GitHub Desktop.
Solution for Exercise 4
var deepThought = new Promise(function (resolve, reject) {
setTimeout(function () { resolve(42); }, 1000);
});
deepThought.then(function (answer) {
console.log(answer);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment