A promise returns the same data as a callback function, but can await the reply. With this, when there is a delay receiving data, the syntax is nicer and the better error handing. Most importantly, the browser can continue processing the page and then fill in the delayed data whenever it is ready. The above allows for JavaScript to step away from the normal synchronous processing order, which is running commands one after the other in the order MORE q
By DarkMG73 on April 17th, 2020 in