Last active
July 21, 2016 20:45
-
-
Save xjamundx/23e3139aefb54189507daa7a7f1bba04 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
// here is an async function | |
async function getNumber() { | |
return 4 // actually returns a Promise | |
} | |
// the same function using promises | |
function getNumber() { | |
return Promise.resolve(4) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment