Async Await in JavaScript and a helpful utility function /01
Mar 27, 2024
Basically they are a way to handle handling asynchronous actions and then do things after the value returns. For example, in the browser you can make a fetch request and then wait for the request to complete before trying to read the response. Or in nodejs, make a request to the server's file system and wait for the OS to return the file request before working with that data. In this article we are going to go over some really cool ways to work with promises using async/await syntax. Async Await was introduced to add some sugar on top to reduce some of the complex parts of working with promises.