re: Async without await, Await without async VIEW POST


This is a nice article Kevin.
Wanted to add little more about async function to complement with this article.

The async function automatically wraps the return value inside a promise. Whether you return a plain JS object or a Promise, it will be wrapped with a promise. Note: The compiler automatically flattens any nesting of promise for you.

In short if you are returning a promise in an async function, you can even let go of async and it will still work fine.

code of conduct - report abuse