Last active
March 29, 2021 05:32
-
-
Save dd701116/bdc68c8fbd793f3b95f6fbdf3c4f276b to your computer and use it in GitHub Desktop.
The 3 ways to make an asynchronous method in JavaScript
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
// The callback method | |
function theCallback() { | |
console.log("Hello from the callback !"); | |
} | |
// The callback will execute in 1000 ms | |
setTimeout(theCallback,1000); | |
console.log("Hello World !"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment