> For the complete documentation index, see [llms.txt](https://hyunholee90.gitbook.io/hyho/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hyunholee90.gitbook.io/hyho/javascript/promise.md).

# Promise

## 1. What is Promise?

We can use callback function for using asynchronous processing. If so, the callback function can't iterate through various logic, low readability, Also, it is hard to handle exceptions errors. To solve these shortcomings,  ES6 provide Promise&#x20;

## 2. Callback Weakness

### Callback Hell

### Error Processing Limit

## 3. How to Create Promise

### Promise State

| State     | Meaning | Materialization |
| --------- | ------- | --------------- |
| Pending   |         |                 |
| Fulfilled |         |                 |
| Rejected  |         |                 |
| Settled   |         |                 |

## How to Use Promise

### Promise Chaining

### Error handling in Promise

## Static Method of Promise&#x20;

### Promise.resolve/Promise.reject <a href="#id-71-promiseresolvepromisereject" id="id-71-promiseresolvepromisereject"></a>

### Promise.all <a href="#id-72-promiseall" id="id-72-promiseall"></a>

### Promise.race <a href="#id-73-promiserace" id="id-73-promiserace"></a>
