Merge pull request #17 from yaDaryStil/patch-1

Update article about Promises chaning
This commit is contained in:
Ilya Kantor 2017-06-07 17:36:30 +03:00 committed by GitHub
commit 046385d923

View file

@ -41,8 +41,8 @@ The idea is that the result is passed through the chain of `.then` handlers.
Here the flow is:
1. The initial promise resolves in 1 second `(*)`,
2. Then the `.this` handler is called `(**)`.
3. The value that it returns is passed to the next `.this` handler `(***)`
2. Then the `.then` handler is called `(**)`.
3. The value that it returns is passed to the next `.then` handler `(***)`
4. ...and so on.
As the result is passed along the chain of handlers, we can see a sequence of `alert` calls: `1` -> `2` -> `4`.