Extracted from MDN Web Doc - Making asynchronous programming easier with async and await
index.js
async function myFetch() {
let response = await fetch('coffee.jpg');
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);