But there’s a lot of functionalities in our program which make our code Asynchronous.
One of them is the Async/Await functionality.
It operates asynchronously via the event loop. Async functions will always return a value.
Await function is used to wait for the promise.
It could be used within the async block only.
It makes the code wait until the promise returns a result.
It only makes the async block wait.
Notice that the console prints 2 before the “Hello World”. This is due to the usage of the await keyword.
Supported Browsers: The browsers supported by Async/Await Function are listed below:
👉 Google Chrome
👉 Apple Safari
Thank you for reading!
Hey, I'm Roshane 👋
If you found this thread useful
👉 Follow me (kendrip_) ✅
👉 Retweet it 🔁
👉 Leave a like 💙
Thank you for the support fellow developers!