---
title: "Can use multiple .then blocks for a single Promise? If so, in what order do they execute?"  
description: "Can use multiple .then blocks for a single Promise? If so, in what order do they execute?"  
author: "Revati S Misra"  
published: 2023-09-26  
updated: 2023-09-26  
canonical: https://www.mindstick.com/forum/159922/can-use-multiple-then-blocks-for-a-single-promise-if-so-in-what-order-do-they-execute  
category: "javascript"  
tags: ["javascript", "promise"]  
reading_time: 2 minutes  

---

# Can use multiple .then blocks for a single Promise? If so, in what order do they execute?

Can use [multiple](https://www.mindstick.com/blog/12797/iowa-is-expected-to-see-heavy-growth-in-multiple-sectors) .then blocks for a single [Promise](https://www.mindstick.com/forum/158328/what-is-a-promise-in-javascript-and-how-do-you-use-it)? If so, in what [order](https://www.mindstick.com/articles/12276/how-timely-order-deliveries-can-improve-customer-experience) do they [execute](https://www.mindstick.com/interview/49/how-can-i-execute-a-php-script-using-command-line)?

## Replies

### Reply by Aryan Kumar

Yes, you can use multiple **.then** blocks for a single Promise in JavaScript. These **.then** blocks are typically used to specify different actions or callbacks to be executed when the Promise resolves successfully, allowing you to chain asynchronous operations together in a readable and maintainable way.

The order in which the **.then** blocks execute is determined by the order in which they are defined in your code. Each **.then** block is executed sequentially, one after the other, following the order in which they appear in your code.

Here's an example to illustrate the execution order of multiple **.then** blocks:

```plaintext
const myPromise = new Promise((resolve, reject) => {
  // Simulate an asynchronous operation
  setTimeout(() => {
    resolve(42); // Resolve the Promise with a value of 42
  }, 1000);
});

myPromise
  .then((result) => {
    console.log("First .then:", result); // Output: First .then: 42
    return result * 2;
  })
  .then((result) => {
    console.log("Second .then:", result); // Output: Second .then: 84
    return result + 10;
  })
  .then((result) => {
    console.log("Third .then:", result); // Output: Third .then: 94
  });
```

In this example:

The first **.then** block logs the result (42) and returns a new value (42 * 2 = 84).

The second **.then** block logs the updated result (84) and returns another new value (84 + 10 = 94).

The third **.then** block logs the final result (94).

The key point is that the order of execution is sequential and follows the order of your **.then** blocks. This chaining of **.then** blocks is a powerful feature of Promises and allows you to create a sequence of asynchronous operations that depend on each other's results.


---

Original Source: https://www.mindstick.com/forum/159922/can-use-multiple-then-blocks-for-a-single-promise-if-so-in-what-order-do-they-execute

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
