In the previous recipe, we saw how to create and send a message to a worker on a background thread. That's pretty great! Before Web Workers were introduced, it wasn't possible for JavaScript to work with anything but the main thread. However, it isn't very useful if we can't get any information back.
In this recipe, we'll see how to wait for, and send responses back from, a Web Worker.