There is a special syntax работы for working with promises called
async / await.
An asynchronous function⚙️ is defined by an asynchronous function expression⚙️. The basic function⚙️ looks like this:
We define a function⚙️ to be asynchronous using
async. This keyword can be used with any syntax for a function declaration:
Once we have defined the function as asynchronous, we can use the
This keyword is placed before a promise call, it pauses the function until the promise is fulfilled or rejected.
Thanks goes to these wonderful people (emoji key):