JavaScript · Senior · Question 12 of 75

What doesn't code inside a Web Worker have?

Explanation

A worker runs in a separate thread, so heavy computations don't block the UI. fetch, timers, IndexedDB and modules (type: 'module') are available. Data is passed by copying (structured clone) or by transferring ownership (Transferable, e.g. ArrayBuffer).

Further reading

Problem with a question

JavaScript · Senior · question 12

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