JSFiddle - React, Tailwind, and code Playground
JavaScript
async function returnValue () {
try {
return 123;
} catch (error) {
console.log('Exception caught', error);
}
}
async function test () {
console.log('before');
const value = await returnValue();
console.log(value.toUpperCase());
console.log('after');
}
test().catch(error => console.error('Uncaught', error));