Created
February 5, 2020 11:13
-
-
Save Mayankgupta688/a21849d2af7f529d06cbad9e1665a530 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
function returnPromises() { | |
return new Promise((resolve) => { | |
setTimeout(() => { | |
console.log("Promise Executed..."); | |
resolve("Sample Data"); | |
}, 3000); | |
}); | |
} | |
async function ExecuteFunction() { | |
var newData = "Mayank"; | |
var getData = await returnPromises(); | |
console.log(getData); | |
} | |
ExecuteFunction() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment