It is also ideal if we have several scripts that access each other, meaning they must be executed in the order in which we want them to be. It’s surprisingly easy to understand and use. To create an async function, all you need to do is add the async keyword before the function definition: const sayHi = async () => { return 'Hey dev '; } The async keyword before any function always means one (and just one) thing: it returns a promise . We've all written code like this—but in this post, I'll talk about async and await . It can make code easier to read and debug. How To Use async/await in React: what is async/await? Note: The async attribute is only for external scripts (and should only be used if the src attribute is present). In today’s world, where JavaScript plays a key role in the dynamics of modern websites, this means that the page is already visible at this point in time, but the user cannot necessarily interact with it, because the scripts required to process events or inputs, for example, have yet to be loaded and executed. The Async Iterators were added in the ES2018 iteration of JavaScript. Async await may already work in your browser, but if not you can still use the functionality using a javascript transpiler like babel or traceur. public async init () {. A lot of people use async await like this: const userResponse = await fetchUserAsync(); const postsResponse = await fetchPostsAsync(); Without the async attribute, this script would block the loading of our entire website for an extremely long time. The async and await keywords are a great addition to Javascript. They make it easier to read (and write) code that runs asynchronously. This property reflects the async attribute of the