Browser & Web Performance · Middle · Question 12 of 75

What is the advantage of scheduler.yield() over setTimeout(resolve, 0) for yielding?

Explanation

Both let the browser handle input and render, but with setTimeout your remaining work waits behind any other tasks.

Further reading

Problem with a question

Browser & Web Performance · Middle · question 12

Test yourself

Take the Browser & Web Performance · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz