JSFiddle - React, Tailwind, and code Playground

by Gajus Kuizinas

JavaScript

'use strict';

console.log('a');

async () => {
    console.log(1);

    try {
        await new Promise(() => {
            throw new Error('Oops #0');
        });
    } catch (e) {
        console.log(e);
    }

    await new Promise(() => {
        throw new Error('Oops #1');
    });

    console.log(2);
} ();

console.log('b');