Deferred

Deferred is an object that represents work that is not yet being done, and promise is an object representing a value that is not yet known.

The objects provide a way to take care of registering multiple callbacks into a self-managed callbacks queues, invoke callbacks queues, and relay the success or failure state of any synchronous function.

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.