-
-
Save joshmanders/2e90b2b372c9bf4971f3af2450d1c10d 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
const doSomething = () => new Promise((resolve, reject) => resolve('hi')) | |
doSomething().then((result) => console.log(result)) // hi |
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
const doSomething = () => new Promise((resolve, reject) => resolve('hi')) | |
async function main () { | |
const result = await doSomething() | |
console.log(result) // hi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment