Async Await Javascript

async function fetchData() {
	let result = await someAsyncFunction(); // Waits for the Promise to resolve
	console.log(result);
}
async function fetchData() {
	try {
		let result = await someAsyncFunction(); // Waits for the Promise to resolve
		console.log(result);
	} catch (err) {
		console.error(err);
	}
}