Async function in JavaScript.

Without blocking main thread you can write code like Promise (as it's synchronous).

What I like about async function is that it's more readable, especially for those who are not much familiar with Promises.

Here is small example of same in JsFiddle with difference in Promise and Async function.

Needless to say but, this is supported in the newer versions of browsers.

Learn Something New Everyday,
Connect With The Best Developers!

Sign Up Now!

& 500k+ others use Hashnode actively.

No Comments Yet