liveBook · Manning

Promise

As explained in Acing the Frontend Interview

A promise is a JavaScript object representing the eventual completion or failure of an asynchronous operation and its resulting value.

A promise is a JavaScript object representing the eventual completion or failure of an asynchronous operation and its resulting value. It supports non-blocking, event-driven programming alongside the event loop and async/await. section 3.12 section 3.3

Because JavaScript runs synchronously by default and can block the main thread during long-running work, promises help schedule asynchronous tasks without freezing responsive web applications. section 3.3

API request

An API request is a representative asynchronous operation: promise-based scheduling keeps the application responsive while the request is processed, then exposes its resulting value or failure for follow-up handling. section 3.3

How Acing the Frontend Interview covers it

How deep it goes
Explains the role of promises and names chaining, async/await, and error handling, without detailing promise internals.
Examples
Uses API requests, animations, and user interactions as representative asynchronous operations.
What it assumes
Assumes JavaScript fundamentals and introduces asynchronous scheduling against synchronous, single-threaded execution.
What you can do after
Apply promises by chaining them, combining them with async/await, and handling asynchronous errors.
How it connects
Connects promises with the event loop, callbacks, async/await, asynchronous programming, and asynchronous error handling.

Also explained in

Compare how 11 books explain promise →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Frontend Interview. The section links point to the parts of the book it draws on.