JavaScript · Senior · Question 57 of 75

When is requestIdleCallback appropriate?

Explanation

The callback gets a deadline (timeRemaining()); do small chunks and reschedule. Pass timeout to guarantee it runs eventually on busy pages.

Further reading

Problem with a question

JavaScript · Senior · question 57

Test yourself

Take the JavaScript · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz