Performance·Intermediate·Conceptual·1 min read
What can a Web Worker do that the main thread cannot?
Short interview answer
A dedicated worker runs JavaScript in a separate global context and thread, so CPU work need not block input, style, layout, and paint on the main thread. It cannot directly access the DOM and communicates through messages.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.