Promises in JavaScript

As we all know that Js is the synchronous language because it works line by line and its a default behavior. But we can not rely on the…