Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- console.log('A');
- (async () => {
- try {
- const result = await new Promise((resolve, reject) => {
- resolve('B');
- });
- console.log(result); // B
- } catch (e) {
- console.log('caught something');
- }
- })();
- console.log('C');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement