Last active
October 7, 2022 14:32
-
-
Save Mayankgupta688/e0d4c9cc6ad3836cb512e804caa8f0ce 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() { | |
var newPromise = new Promise((resolve) => { | |
setTimeout(() => { | |
console.log("Promise Executed..."); | |
resolve("Sample Data"); | |
}, 3000); | |
}); | |
} | |
function ExecuteFunction() { | |
var newData = "Mayank"; | |
var getPromise = returnPromises(); | |
console.log(newData); | |
} | |
ExecuteFunction() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very on ce