In this lab, you will learn about the
requestIdleCallback function, which can be used to schedule work to run when the browser is idle. This can be particularly useful when performing non-essential tasks that shouldn't interfere with the browser's main work, such as rendering and user input handling.
requestIdleCallback to change the text inside the div only when the browser has idle time, simulating a task that shouldn't block the main thread.
By the end of this lab, you should have a solid understanding of the
requestIdleCallback function and how to use it effectively to improve your web applications' performance.