Created
October 20, 2021 11:06
-
-
Save AhmedTarekHasan/e047a2e5a4c2abe4c9b3fe3e7573b565 to your computer and use it in GitHub Desktop.
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
let doInterestingThings = function() { | |
return new PromiseWithTimeout((resolve, reject) => { | |
// do some interesting things | |
// call resolve(data) or reject() before 5 seconds have passed | |
// otherwise, sorry have to return! | |
}, 5000); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment