This is an option for waiting for anything to be done.
Class when dealing with things, that need a short amount of time.
BUT: We won’t use it like this!
# Real-World Example
For this GET-request, we use the fetch API.
# async/await ?
This is the replacement for promises.
When using this method, we no longer need the .then(), .catch(), .finally().
When we make the GET-request we wait until this request is finished. When we have to data we write it into the console.
# Error-Handling
For the async/await we need a simple try-catch.
# Fetch-API
This is a builtin-browser function.
This method is promise-based. Meaning, that we are able to use async/await.