I do not undetstand the async example. What is the difference between
try {
const response = await fetch(url);
const text = await response.text();
element.textContent = text;
} catch (error) {
element.textContent = error.message;
} finally {
hideLoadingSpinner();
}
and try {
const response = await fetch(url);
const text = await response.text();
element.textContent = text;
} catch (error) {
element.textContent = error.message;
}
hideLoadingSpinner();
?Other than that, this is great. But I don't understand the async/await version