Where Promises.js came in?

Those of you who are aware of how a server-side script executes in an I/O event know that reading or writing data to and from a drive is blocking in nature, that is, during its execution, no other operation can be performed by a server-side language, even by the client. Well, with Promises.js, this is no longer the case. Promises.js utilizes a nonblocking strategy to perform I/O operations, so a client using your web app is free to perform any other tasks they want to without having to wait for the data read/write operation to be completed.

Get Mastering JavaScript Promises now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.