← Your UI is freezing because you never gave the browser a breakQuiz

scheduler.yield() — unblocking the main thread

A long synchronous task holds the main thread and queues every paint and click behind it. scheduler.yield() hands control back mid-task and resumes where it left off. These questions check what the await actually does, why the popular one-line polyfill throws in exactly the browser it was written for, why you should yield on elapsed time rather than item count, where the 50 ms figure comes from, how the continuation's priority compares to postTask, and what yielding costs you.

questions8
pass mark70%
feedbackinstant

No account needed. Every answer is explained as you go, with a reference to the spec or MDN — pass and you can claim a certificate.