File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
2-ui/99-ui-misc/03-event-loop/2-micro-macro-queue Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -40,18 +40,11 @@ console.log(7);
4040
4141To summarize,
4242
43- <<<<<<< HEAD
44- 1 . Numbers ` 1 ` и ` 7 ` show up immediately, because simple ` console.log ` calls don't use any queues.
45- 2 . Then, after the main code flow is finished, the microtask queue runs.
46- - It has commands: ` console.log(3); setTimeout(...4); console.log(5) ` .
47- - Numbers ` 3 ` и ` 5 ` show up, while ` setTimeout(() => console.log(4)) ` adds the ` console.log(4) ` call to the end of the macrotask queue.
48- =======
49431 . Numbers ` 1 ` and ` 7 ` show up immediately, because simple ` console.log ` calls don't use any queues.
50442 . Then, after the main code flow is finished, the microtask queue runs.
5145 - It has commands: ` console.log(3); setTimeout(...4); console.log(5) ` .
5246 - Numbers ` 3 ` and ` 5 ` show up, while ` setTimeout(() => console.log(4)) ` adds the ` console.log(4) ` call to the end of the macrotask queue.
53- >>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
5447 - The macrotask queue is now: ` console.log(2); console.log(6); console.log(4) ` .
55483 . After the microtask queue becomes empty, the macrotask queue executes. It outputs ` 2 ` , ` 6 ` , ` 4 ` .
5649
57- Finally, we have the output: ` 1 7 3 5 2 6 4 ` .
50+ Finally, we have the output: ` 1 7 3 5 2 6 4 ` .
You can’t perform that action at this time.
0 commit comments