Last active
September 4, 2018 14:38
-
-
Save naoki-sawada/eae43a69dc18c3c42edb6e7ef498e8af to your computer and use it in GitHub Desktop.
Use async await without function
This file contains hidden or 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
(async () => { | |
try { | |
await createConnection(); | |
console.log("connected!"); | |
} catch (e) { | |
console.error(e); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment