JSFiddle - React, Tailwind, and code Playground

by Abdul Ahmad

JavaScript

async function someAsync() {
	throw('error');
}

async function main() {
	try {
   	const res = await someAsync();
  	console.log('res', res);
  } catch (e) {
  	console.log('e', e);
  }
}

main();