Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function takeOff(resolve) {
- setTimeout(function () {
- console.log("I just landed! Woooho!");
- resolve();
- }, 5000);
- }
- function callFriendAndTalkVeryExcitedlyAboutYourPrototype() {
- console.log("Hey friend, you will not believe what my mind stumbled upon...");
- }
- var promise = new Promise(takeOff);
- promise.then(callFriendAndTalkVeryExcitedlyAboutYourPrototype);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement