← All notes

JavaScript promises: deferred results that settle once

Answer: A promise represents an operation that hasn't completed yet. A promise can only succeed or fail once. HTML also tracks unhandled promise rejections.

What a promise is

Promises simplify deferred and asynchronous computations.

The page says a promise represents an operation that hasn't completed yet.

A promise is a bit like an event listener. Success or failure happens only once, and it cannot happen twice.

Rejection tracking in HTML

The Standard describes unhandled promise rejections in its scripting hooks.

Each global object keeps an outstanding rejected promises weak set, which starts empty.

The same object also keeps an about-to-be-notified rejected promises list.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: web.dev, JavaScript promises: An introduction; WHATWG, HTML Living Standard, Web application APIs. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-4.0 (https://raw.githubusercontent.com/whatwg/html/main/LICENSE). Copyright WHATWG contributors. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: web.dev, JavaScript promises: An introduction; WHATWG, HTML Living Standard, Web application APIs. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-4.0 (https://raw.githubusercontent.com/whatwg/html/main/LICENSE). Copyright WHATWG contributors.

Cite this

Permanent ID: iil:note:h2bpqcpq

iinventedlight. 2026. "JavaScript promises: deferred results that settle once." iinventedlight Library, iil:note:h2bpqcpq, version of 2026-11-23. https://iinventedlight.com/library/notes/javascript-promises/. License: CC-BY-4.0.

@misc{iil_note_h2bpqcpq,
  author = {{iinventedlight}},
  title = {{JavaScript promises: deferred results that settle once}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-23},
  url = {https://iinventedlight.com/library/notes/javascript-promises/},
  note = {Permanent ID iil:note:h2bpqcpq. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/javascript-promises.md.