File tree Expand file tree Collapse file tree 1 file changed +0
-8
lines changed
1-js/11-async/03-promise-chaining Expand file tree Collapse file tree 1 file changed +0
-8
lines changed Original file line number Diff line number Diff line change @@ -34,19 +34,11 @@ new Promise(function(resolve, reject) {
3434
3535A ideia é que o resultado seja passado através de uma cadeia de tratadores ` .then ` .
3636
37- <<<<<<< HEAD
3837O fluxo é o seguinte:
39381 . A promessa inicial é resolvida em 1 segundo ` (*) ` ,
40392 . Então o tratador de ` .then ` é chamado ` (**) ` , que por sua vez cria uma nova promessa (resolvida com o valor ` 2 ` ).
41403 . O próximo tratador ` .then ` ` (***) ` recebe o valor retornado pelo anterior, o processa (o duplica) e ele é passado ao próximo tratador.
42414 . ...e assim por diante.
43- =======
44- Here the flow is:
45- 1 . The initial promise resolves in 1 second ` (*) ` ,
46- 2 . Then the ` .then ` handler is called ` (**) ` , which in turn creates a new promise (resolved with ` 2 ` value).
47- 3 . The next ` then ` ` (***) ` gets the result of the previous one, processes it (doubles) and passes it to the next handler.
48- 4 . ...and so on.
49- >>>>>>> 4541b7af7584014a676da731f6e8774da5e059f6
5042
5143Como o resultado é passado através da cadeia de tratadores, podemos observar a sequência de chamadas ` alert ` : ` 1 ` -> ` 2 ` -> ` 4 ` .
5244
You can’t perform that action at this time.
0 commit comments