<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-a-javascript-promise-really-settles-pokfccqag" -->

---
title: How a JavaScript Promise Really Settles | daily.dev
description: Calling resolve() does not always fulfill a promise: it only does so for ordinary values. A promise settles once, so later resolve, reject or throw calls...
canonical: https://daily.dev/posts/how-a-javascript-promise-really-settles-pokfccqag
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How a JavaScript Promise Really Settles | daily.dev
og:description: Calling resolve() does not always fulfill a promise: it only does so for ordinary values. A promise settles once, so later resolve, reject or throw calls...
og:url: https://daily.dev/posts/how-a-javascript-promise-really-settles-pokfccqag
og:image: https://api.daily.dev/og/posts/PokfccQAG.png
og:image:alt: How a JavaScript Promise Really Settles
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How a JavaScript Promise Really Settles

**[Telerik](https://daily.dev/sources/telerik)** · 12 min read · 0 upvotes · 0 comments

## Summary

Calling resolve() does not always fulfill a promise: it only does so for ordinary values. A promise settles once, so later resolve, reject or throw calls inside the executor are ignored. The executor runs synchronously, but .then() handlers always run later as microtasks, even on an already fulfilled promise. Resolving with another promise or thenable makes the outer promise follow it, so it can stay pending while already resolved. .finally() receives no arguments and passes the original value or reason through unless it throws.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.telerik.com/blogs/how-javascript-promise-really-settles>

## Questions this post answers

### Does calling resolve() in a JavaScript promise always fulfill it?

No. resolve() only fulfills the promise immediately when given an ordinary value. If you resolve with another promise or a thenable, the outer promise locks onto it and follows its fate. It counts as resolved but can remain pending until the inner promise fulfills or rejects, and then adopts the same value or reason.

_Developers untangling async JavaScript behavior follow subtleties like this on daily.dev._

### Why does a .then() handler run later even if the JavaScript promise is already fulfilled?

Promise reactions are scheduled as microtasks. Even when the promise is already settled before .then() is attached, the handler does not run in the middle of current synchronous code. Output order is synchronous logs first (A, B, C), then the .then() callback runs afterward as a microtask.

_Debugging async ordering bugs is easier when you keep up with JavaScript internals on daily.dev._

### What happens if I call resolve() and then reject() or throw inside a Promise executor?

Only the first settling call wins. After resolve('first'), a later resolve, reject or thrown error in the same executor has no effect on the promise state. The executor itself still runs synchronously, so later calls execute as function calls but cannot change the already fixed outcome.

_Developers hardening async error handling in JavaScript can follow related deep-dives on daily.dev._

## Similar posts on daily.dev

- [Promise.all vs allSettled vs race vs any](https://daily.dev/posts/promise-all-vs-allsettled-vs-race-vs-any-xfkanzqgv) · Flavio Copes · 3 upvotes · 0 comments
- [JavaScript Microtasks vs Tasks: What Runs First?](https://daily.dev/posts/javascript-microtasks-vs-tasks-what-runs-first--zlnrvrlzg) · Medium · 141 upvotes · 5 comments
- [JavaScript Promise Combinators: race\(\), all\(\), allSettled\(\), and any\(\)](https://daily.dev/posts/javascript-promise-combinators-race-all-allsettled-and-any--s4d5eweoy) · Medium · 5 upvotes · 0 comments
- [How the JavaScript Runtime Schedules Callbacks: A Look at the Event Loop](https://daily.dev/posts/how-the-javascript-runtime-schedules-callbacks-a-look-at-the-event-loop-qkr1ufg7o) · Medium · 4 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/how-a-javascript-promise-really-settles-pokfccqag)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How a JavaScript Promise Really Settles","url":"https://daily.dev/posts/how-a-javascript-promise-really-settles-pokfccqag","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-a-javascript-promise-really-settles-pokfccqag"},"datePublished":"2026-11-30T18:34:38.440Z","dateModified":"2026-11-30T18:35:01.546Z","description":"Calling resolve() does not always fulfill a promise: it only does so for ordinary values. A promise settles once, so later resolve, reject or throw calls...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d922919f0b8949cfa6df186cffde1d5f?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d922919f0b8949cfa6df186cffde1d5f?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Telerik","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Telerik","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5ee6d4bef8ac4f84886d06f5881963e7","url":"https://daily.dev/sources/telerik"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-a-javascript-promise-really-settles-pokfccqag","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Telerik","item":"https://daily.dev/sources/telerik"},{"@type":"ListItem","position":3,"name":"How a JavaScript Promise Really Settles"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-a-javascript-promise-really-settles-pokfccqag#faq","mainEntity":[{"@type":"Question","name":"Does calling resolve() in a JavaScript promise always fulfill it?","acceptedAnswer":{"@type":"Answer","text":"No. resolve() only fulfills the promise immediately when given an ordinary value. If you resolve with another promise or a thenable, the outer promise locks onto it and follows its fate. It counts as resolved but can remain pending until the inner promise fulfills or rejects, and then adopts the same value or reason. Developers untangling async JavaScript behavior follow subtleties like this on daily.dev."}},{"@type":"Question","name":"Why does a .then() handler run later even if the JavaScript promise is already fulfilled?","acceptedAnswer":{"@type":"Answer","text":"Promise reactions are scheduled as microtasks. Even when the promise is already settled before .then() is attached, the handler does not run in the middle of current synchronous code. Output order is synchronous logs first (A, B, C), then the .then() callback runs afterward as a microtask. Debugging async ordering bugs is easier when you keep up with JavaScript internals on daily.dev."}},{"@type":"Question","name":"What happens if I call resolve() and then reject() or throw inside a Promise executor?","acceptedAnswer":{"@type":"Answer","text":"Only the first settling call wins. After resolve('first'), a later resolve, reject or thrown error in the same executor has no effect on the promise state. The executor itself still runs synchronously, so later calls execute as function calls but cannot change the already fixed outcome. Developers hardening async error handling in JavaScript can follow related deep-dives on daily.dev."}}]}
```

