Making asynchronous code look synchronous in JavaScript

Why go asynchronous Asynchronous programming is a great paradigm which offers a key benefit over its synchronous counterpart - non blocking I/O within a single threaded environment. This is achieved by allowing I/O operations such as network requests and reading files from disk to run outside of the…