Update article.md

This commit is contained in:
Violet.Lee 2019-07-19 01:23:48 +09:00 committed by GitHub
parent 369b0ba4e6
commit 2695e4f00a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,7 +138,7 @@ new Promise(function(resolve, reject) {
}); });
``` ```
Here the first `.then` shows `1` returns `new Promise(…)` in the line `(*)`. After one second it resolves, and the result (the argument of `resolve`, here it's `result*2`) is passed on to handler of the second `.then` in the line `(**)`. It shows `2` and does the same thing. Here the first `.then` shows `1` and returns `new Promise(…)` in the line `(*)`. After one second it resolves, and the result (the argument of `resolve`, here it's `result*2`) is passed on to handler of the second `.then` in the line `(**)`. It shows `2` and does the same thing.
So the output is again 1 -> 2 -> 4, but now with 1 second delay between `alert` calls. So the output is again 1 -> 2 -> 4, but now with 1 second delay between `alert` calls.