Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 886 Bytes

event-loop.md

File metadata and controls

33 lines (22 loc) · 886 Bytes

JS Event Loop Exercise

The goal of this exercise is to deepen your knowledge about the javascript event loop, the difference between micro- and macrotasks and the execution timings of different scheduling APIs.

Please write a function that results in the following flamechart.

You can use this plain javascript example as a starting point for your exercise. exercise template.

Note

It's also possible to run this exercise by checking out the js playground project. Use that one if you have problems with stackblitz

img.png

Scheduling APIs
// scheduling APIs

setTimeout();
Promise.resolve();
queueMicrotask();
window.requestIdleCallback();
requestAnimationFrame();