Last active
September 25, 2019 06:28
-
-
Save ff6347/7fbffde24b62cc5ba499ca6198d67f6d to your computer and use it in GitHub Desktop.
async main function for JS without writing it again
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
| void (async function main() { | |
| console.log(foo); | |
| })() | |
| .catch(err => { | |
| console.error(err); | |
| // throw err; | |
| }) | |
| .finally(res => { | |
| console.log("finally"); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment