File tree 1 file changed +2
-2
lines changed
1-js/11-async/02-promise-basics
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ So to summarize: the executor runs automatically and attempts to perform a job.
36
36
The ` promise ` object returned by the ` new Promise ` constructor has these internal properties:
37
37
38
38
- ` state ` — initially ` "pending" ` , then changes to either ` "fulfilled" ` when ` resolve ` is called or ` "rejected" ` when ` reject ` is called.
39
- - ` result ` — initially ` undefined ` , then changes to ` value ` when ` resolve(value) ` called or ` error ` when ` reject(error) ` is called.
39
+ - ` result ` — initially ` undefined ` , then changes to ` value ` when ` resolve(value) ` is called or ` error ` when ` reject(error) ` is called.
40
40
41
41
So the executor eventually moves ` promise ` to one of these states:
42
42
@@ -281,7 +281,7 @@ To summarize:
281
281
- If a `finally` handler returns something, it's ignored.
282
282
- When `finally` throws an error, then the execution goes to the nearest error handler.
283
283
284
- These features are helpful and make things work just the right way if we `finally` how it's supposed to be used: for generic cleanup procedures.
284
+ These features are helpful and make things work just the right way if we use `finally` how it's supposed to be used: for generic cleanup procedures.
285
285
286
286
````smart header="We can attach handlers to settled promises"
287
287
If a promise is pending, `.then/catch/finally` handlers wait for its outcome.
You can’t perform that action at this time.
0 commit comments