Created
December 6, 2021 05:41
-
-
Save margani/61cda9736591b47730e58f69f93ee58a to your computer and use it in GitHub Desktop.
Top-level async function that never rejects #js #async
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 { | |
var text = await main(); | |
console.log(text); | |
} catch (e) { | |
// Deal with the fact the chain failed | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment